Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: not2easy
background-position: 158px 150px;
I also have an external css file coded like this
It works fine under Netscape 4.6 and IE6.0 but it does not work with Netscape 7.0.
I checked path issues already and "./00Pix/backgound.gif" shows same peculiarities (works with Netscape 4.6. IE6.0 but not with Netscape 7.0)
Sorry I could not help but instead raised some more questions.
Remove the comments from your style sheet and you'll see that it'll work ;)
The old way of doing it was:
<style = type="text/css">
However, a browser is allowed to ignore anything within comments, hence your style sheet will not be rendered. Also, it may not be rendered unless you have specified type="text/css" in your style tag.
When I poste the first message I did not give you a complete picture of my problem - that has been may fault.
The thing that drives me mad is, that every statement else specified in the css file is rendered ok. There are almost no differences between IE6.0, Netscape 4.0 and Netscape 7.0 (except for example that font size small for Netscape is about the same size as x-small of IE). The only thing that does not work in my case is the background-image statement. Netscape 7.0 ignores it. The other 2 mentioned browsers render it ok.
Now I did as you told me and removed the comment tags in the css-file. Result was the same. Everything except the background-image statement was rendered as it should. However, Netscape 4.0 ignored the background image statement as well.
Well it is late now and I should go to bed and sleep about it. I will give it a new try tomorrow. Since no one else has similar problems, I am afraid that there is a stupid mistake somewher in my code.
Thanks for the advice, good night
Also be careful if the image, the css file and the page itself are not all in the same directory. I'd suggest using absolute URLs if that's the case, or relocating the css and image files to the same directory as the HTML.
I've heard of some browser inconsistencies when you use relative paths to other directories (that is, a difference in whether the path is read as relative to the HTML page or relative to the CSS file)
As all of you suggested I checked and double checked the path. I tried several options. I used absolute and relative URLs, and I put the background image in the folder of the css and html file. Here are the results:
The background-image attribute of the body tag specified in a external css file is ignored by (my) Netscape 7.0.
If the css is included within the head of the html document Netscape 7.0 renders it ok.
The comfort of external css is lost. But I guess I have to live with it.
Thanks for your help.
If your CSS file is in a subdirectory, you will have to change the path.
Then, it still won't work in NN4, since NN4 gets it wrong. So, using an absolute path is probably the best solution:
in the head of an HTML page it works fine but if I put it on a CSS sheet it doesn't work at all. This is true no matter what version of Netscape or IE I've tried.
Meanwhile everything else I have on the separate stylesheet works fine. I haven't tried to replace tables but font size, font and background color etc works great.
I must be missing some subtle thing. Any ideas?