Forum Moderators: not2easy
I'm new to CSS and need some advice. Apparently Netscape 4.x has a lot of issues with CSS. In particular I'm trying to place an image in the left hand corner of my page (as a logo) as well as place a thin border around my top & left navigation bars to give it that frame appearance.
The borders disappear in NN4 and the logo is not sized correctly. I've created an external style sheet and have placed everything within <DIV> in my HTML file.
CSS E.G
#leftmargin {position:absolute;
left:0cm; top:0cm;
height:1500cm;width:4cm;
background-color: #3333ff;
layer-background-color: #3333ff;
border-style:solid;
border:solid;
border-width:thin;
}
#logo{position:absolute;
left:0cm; top:0cm;
height:10cm; width:10cm;
background-color:#ffffff;
layer-background-color:#ffffff;
background-image:url(logo.gif);
layer-background-image:url(logo.gif);
}
Any advice?
Thanks in advance.
Chris.
Any advice?
Yeah... don't worry about NN4! :)
It accounts for less than 2% of the browsers out there and that number is only going to drop.
Just bump them to [webstandards.org...] instead.
Found it in the CSS forum library [webmasterworld.com]
NN4 doesn't like fancy "full properties". For example, it chokes on "border-width, border-style, border-color", but it handles "border" just fine. Again, it doesn't understand "border-top, border-right, border-bottom, border-left".
In short, NN4 is very picky. Either something works, or it doesn't work at all. On top of that, it usually has some weird issues whenever it can render something.
Now, to the image thing...
#logo{position:absolute;
left:0cm; top:0cm;
height:10cm; width:10cm;
background-color:#ffffff;
layer-background-color:#ffffff;
background-image:url(logo.gif);
layer-background-image:url(logo.gif);
}
I take it that #logo is the ID of a div, and that the image you want to resize is "logo.gif". Unfortunately, that is doomed to fail. Some, though very few, browsers can understand certain tricks that will make them resize a background image. But in most cases that effect is impossible to acheive. So, that leaves you with two options:
1) Resize the image manually.
2) Position the image inside the #logo div (using a normal <img> tag and CSS). The text will then float on top of the image.
Both solutions work very well, and have solid support, even in a browser such as NN4 :)
Regards,
Chris.
NN4 doesn't like fancy "full properties". For example, it chokes on "border-width, border-style, border-color", but it handles "border" just fine. Again, it doesn't understand "border-top, border-right, border-bottom, border-left".
Is there any way of getting NN4 to ignore border attributes? I'm trying to use them for a menu, but NN4 is going crazy. Given that it's a dying technology, I don't mind giving NN4 users an unformatted list of links, but I do object to them not being able use the links (particularly since an CSS-unaware broser like Lynx has no problems!).
[qoute]Is there any way of getting NN4 to ignore border attributes? [/quote]
How about border: none;?
Then if you @import a styleheet for the newer browsers only nn4 will ignore the border.
-And i am soooo glad NN4 is dying - it must have been a pain a couple of years back having to produce designs for it.
Regards
Hafnius
How about border: none;?Then if you @import a styleheet for the newer browsers only nn4 will ignore the border.
Thanks for the advice, but I also found what is perhaps a more elegant solution in another thread([webmasterworld.com ]): use @media all.
With this, you can hide CSS code fromm NN4 without specially creating a new file for later browsers. Check out the thread.
NN4 will display the red color, but ignore the border.
For more information, check this thread about getting style sheets to work in NN4 [webmasterworld.com]