Page 1 of 1

CSS is not cross-browser

Posted: Mon Dec 16, 2002 8:04 am
by f1nutter
I have the following entries in a style sheet.

Code: Select all

.menu
{
 color: black;
}

a.menu
{
 color: black;
 text-decoration: none;
}

a.menu:hover
{
 color: red;
 text-decoration: none;
}
Now, with IE 5.5 this works as you would expect. Any link that is class="menu" is coloured black instead of blue, and has the underlining removed. When you place the mouse over the link, it turns red.

But in NS Navigator 4.7, the link is coloured black, but does not change when you place the mouse over the link. However, is turns red when the link is clicked only.

Why is not working in Netscape, or is there any alternative method I could use.

(Netscape is only use for testing as it is more 'fussy' than IE)

Thanks.

Posted: Mon Dec 16, 2002 9:05 am
by onestop
Hi
Netscape 4x has never supported the hover option. It is supported in Netscape 6 + and all other modern browsers.

Your css isn't broken its just badly supported on old browsers.

The workaround would involve writing mouseover functions to handle the color changes.

Netscape 4x is well past its sell by date now and only has around 2% market share - personally I think the time is right to stop supporting 4x browsers in favor of valid html and css compliant code following standards
set out at w3.org (just my opinion)

Anyway apart from scripting there is no way to get the hover working on N4x

Andy

Posted: Mon Dec 16, 2002 10:21 am
by f1nutter
That puts my mind at rest.

I use NS because its stricter than IE, so a missed closing td will render a table as one long line of text.

This way, I can show my site to as many people as possible. I am converting everything to w3.org spec, removing deprecated tags and using style sheets. I have even removed frames so that a few extra browsers and search engines read my site properly. Extra fussy, but I'm a bit of a perfectionist!

Thanks again.

Posted: Mon Dec 16, 2002 11:06 am
by onestop
Hi

I no longer support v4 browsers but they are still useful for noticing coding errors (such as mentioned above) I am now writing to standards and find life a lot easier.

Takes a bit of self discipline at first but its worth the effort :)

btw I took a quick look at your site (if it is yours) lots on there :) I just thought that I would mention it took forever to get past the splash page. That could be caused by anything but I thought I would mention it :)

Andy

Posted: Mon Dec 16, 2002 11:58 am
by f1nutter
Yes, that is my site, I'm very proud of it. I spend far too much time fiddling with it instead of doing real work!

Thanks for the feedback. The Flash animation is only 3kB, the logo 4kB, so should only take a couple of seconds to load. When the lights go out, it should take you into the rest of the site.

Any more comments would be greatly appreciated.

Posted: Mon Dec 16, 2002 12:19 pm
by Johnm
The site loaded fine for me but I am on a T1 line. The only thing that I noticed is that the " [Have your say] " link pointing at viewforum.php is broken.


John M