Hi all,
I am experiencing a problem that I can not explain. The background-image property does not seem to work when placed in the body element in an external CSS file. However, when placed inline in the body element of my pages, the background image appears. I tried to track down the cause of the problem by deleting everything except the body element in the external CSS file and keeping everything inside it the same. Then I deleted everything on my homepage until all I had was a page with nothing but bare bone HTML tags. To my surprise the background image still did not show up. My path in the background-image property is images/Back.jpg. My HTML files and the images folder (where I keep all my images) are on the same level. Can someone please tell me what the problem could be. Thanks in advance for your help.
background image not showing
Page 1 of 14 Replies - 336 Views - Last Post: 13 July 2012 - 08:06 AM
Replies To: background image not showing
#2
Re: background image not showing
Posted 13 July 2012 - 12:57 AM
is the CSS file on the same level as the HTML file?
#3
Re: background image not showing
Posted 13 July 2012 - 01:02 AM
Hi, thanks for replying. The css file is in a folder called CSS and this folder is on the same level as the html files.
#4
Re: background image not showing
Posted 13 July 2012 - 01:04 AM
as I thought. the path of the image given in the CSS file is resolved relative to the CSS file’s location. hence if it works in the HTML file it cannot work in the CSS file. you would need to change the image path in the CSS file accordingly.
#5
Re: background image not showing
Posted 13 July 2012 - 08:06 AM
My problem is resolved, thank you for everything.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|