...

View Full Version : header image not working FF



misheck
11-14-2009, 01:24 PM
I have a back-ground image for my header which seems to only be working in IE but not firefox. I cant understand why its not working. Here is the css code for the
#header {
width: 1000px;
height: 150px;
background-image:url(D:/Websites/Study/shout-africa/SHOUTAFRICA/bigshout/root/images/shout4.jpg);
}

abduraooft
11-14-2009, 02:22 PM
background-image:url(D:/Websites/Study/shout-africa/SHOUTAFRICA/bigshout/root/images/shout4.jpg);
Use relative path to refer that image.

misheck
11-14-2009, 09:42 PM
Thanks I am still new to css but I managed to solve it using your reply.

So to use a relative path I will have to add
../images thats just an example?

abduraooft
11-15-2009, 11:01 AM
So to use a relative path I will have to add


../images

thats just an example? The path will depend upon the relative position of your html file(or the css file, in case of external css) and image. Where are they located in your case?

misheck
11-15-2009, 12:38 PM
In most of my projects the css files will be in the same parent folder with subfolders for images, php includes, javascripts etc only the index.php or index.html is stored in the parent folder.

I hope you can understand my explanation.

met
11-15-2009, 06:05 PM
if your folder set up is like so:


site root (parent folder)
|-index.php
|-style.css
|-images
|-img1.jpg
|-img2.jpg

/* then use */
style.css:
background:url(images/img1.jpg);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum