I'm using the following code:
#centerpart
{
margin: 0px 97px 0px 97px;
padding: 0px;
background-image: url(dscn1237.jpg);
color: #fff;
height: 300px;
}
IE6 displays the background image as I expect, but Firefox 0.8 and Opera 7.11 do not. Is there something I'm missing?
Roy
Background-image problems
Hi royatl,
The only thing I can think of is the path to the image may be interpreted differently by different browsers.
Paths are meant to be relative to the style sheet but I think it's IE that reads them from the page. So if the CSS file and page are in different directories you can either copy the image into both directories or use an absolute path.
If they are all in the same directory please supply a link so we can have a closer look.
Hope that helps
Background-image problems
well, I set my doctype to 4.01 strict, and now IE6 does the same thing that Opera and Firefox are doing... no images.
The paths are relative to the root dir, which is where both the page and the css are, though I've tried all these forms, to no effect:
\image\pic.jpg
.\image\pic.jpg
image\pic.jpg
I'll set up an example later this afternoon.
Background-image problems
Fixed! It was the path separator. Needed to be in *nix form.