+ 1

The image isn't displaying pls tell why

#showcase{ Min-height: 400px; Background-image: url('.. /img/hall.jpg') no-repeat 0 - 400px ; }

7th Jan 2018, 10:09 AM
Kartik Srivastava
Kartik Srivastava - avatar
17 Answers
+ 6
Show us your CSS link inside HTML e.g. <link type="text/css" href="../css/stylesheet.css" />
7th Jan 2018, 11:12 AM
Calviղ
Calviղ - avatar
+ 4
You could upload your code together with the parent and img folder to GitHub. Share it here.
7th Jan 2018, 10:46 AM
Calviղ
Calviղ - avatar
+ 3
Where is your image located?
7th Jan 2018, 10:11 AM
Calviղ
Calviղ - avatar
+ 3
The image location of "../img/hall.jpg" is referred to a image located at <current parent folder>/img/hall.jpg. If image is not in that location, it wouldn't display. Web url doesn't care where your desktop location is, you should check the image location could be referred by current index.html working folder location.
7th Jan 2018, 10:25 AM
Calviղ
Calviղ - avatar
+ 2
where is your CSS file placed ??
7th Jan 2018, 10:53 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 2
for example: Folder > Images Folder >IMG.jpg for CSS: Folder > CSS folder > style.css for html: Folder > index.html please show your files structure in this way
7th Jan 2018, 10:59 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
Desktop > folder > folder > image
7th Jan 2018, 10:19 AM
Kartik Srivastava
Kartik Srivastava - avatar
+ 1
could you please tell it in hierarchical way??
7th Jan 2018, 10:57 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
and please make sure that you have linked your CSs file to your html file
7th Jan 2018, 11:01 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
once remove the other attributes except URL() and see if the image is displayed??
7th Jan 2018, 11:16 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
It is at same location only. Still its not displaying. Can I get your email or something I'll send the code there
7th Jan 2018, 10:32 AM
Kartik Srivastava
Kartik Srivastava - avatar
0
Inside a folder in main folder
7th Jan 2018, 10:55 AM
Kartik Srivastava
Kartik Srivastava - avatar
0
Yes I have linked css file. It's displaying background color, but not image.
7th Jan 2018, 11:05 AM
Kartik Srivastava
Kartik Srivastava - avatar
0
The parent folder(pras) is on desktop. Html file is just inside pras. Css file Desktop > pras > css files > stylessheet.css Image Desktop > pras > img > hall( name of image of type jpg)
7th Jan 2018, 11:08 AM
Kartik Srivastava
Kartik Srivastava - avatar
0
<link rel="stylesheet" href="./css/styles.css>
7th Jan 2018, 11:18 AM
Kartik Srivastava
Kartik Srivastava - avatar
0
that's confung now.. u said your css filename is stylesheet.css and now you menttion it as styles.css and note that there will be '..' to go a step back in folders
7th Jan 2018, 11:20 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
I beg your pardon, it's styles.css See my css file is working fine for my header and all. It's just that I am not able to upload a image
7th Jan 2018, 11:25 AM
Kartik Srivastava
Kartik Srivastava - avatar