can't seem to see logo.jpg inside the header_container div?
I can't figure out why the image is not resolving inside the div id="header_container"
everything looks ok, the image i开发者_Go百科s on the server,,, what's the issue here?
http://winteradagency.com/mrw/index.php
any ideas?
thanks
When you make a CSS url()
directive a relative path, it is relative to the CSS file, not the page the CSS is on. In your case, the header_container
directive is:
background-image: url(images/logo.jpg);
Because your CSS file is in /mrw/styles/styles.css
, the path that the image is being looked for at is /mrw/styles/images/logo.jpg
. You need to adjust your CSS directive accordingly. One of the following should work:
background-image: url(/mrw/images/logo.jpg);
or
background-image: url(../images/logo.jpg);
Background image URL's in a CSS file are relative to the URL of the CSS file itself, not to the URL of the parent HTML page which included the CSS file.
So, to fix your particular problem, change images/logo.jpg
to ../images/logo.jpg
, otherwise it is trying to lookup the image in styles/images/logo.jpg
精彩评论