5 replies [Last post]
BenPollinger
Offline
newbie
Newcastle upon Tyne, UK
Last seen: 15 years 42 weeks ago
Newcastle upon Tyne, UK
Joined: 2003-09-30
Posts: 9
Points: 0

Dear all,

A strange problem with a:hover in IE6 on Win98SE. As ever, it does exactly what it should in Mozilla and Opera.

Please see:
http://www.pollinger.fslife.co.uk/cacert-redesign/version3.html

The left menu items change background colour when hovered. Any item before 'Reassurance' does not do this properly in IE6, but after that it's fine.

There are also some odd redraw problems with the grey horizontal borders appearing and disappearing. These are implemented as:

#navlist li
{
list-style: none;
padding: 0.25em;
border-top: 1px solid #999999;
}

All XHTML and CSS validate. Any suggestions anyone?

cheers,
Ben

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 day 21 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

a:hover problem in IE6

Hi Ben,
I had a quick look and couldn't see the problem.
Try commenting out sections of your CSS until you find the problem.

Hope that helps

BenPollinger
Offline
newbie
Newcastle upon Tyne, UK
Last seen: 15 years 42 weeks ago
Newcastle upon Tyne, UK
Joined: 2003-09-30
Posts: 9
Points: 0

a:hover problem in IE6

Hi Tony, thanks for the comment.

Could you tell me if you saw the symptoms in IE?

I'll try taking my CSS apart methodically as you suggest, but I'm interested to know if it's just my machine.

Regards,
Ben

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 day 21 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

a:hover problem in IE6

Hi Ben,
Yes I can see the symptoms you mentioned in IE6 on Win.

BenPollinger
Offline
newbie
Newcastle upon Tyne, UK
Last seen: 15 years 42 weeks ago
Newcastle upon Tyne, UK
Joined: 2003-09-30
Posts: 9
Points: 0

Cracked it!

Hi Tony et al,

I cracked it! Fixed by changing a DIV class to an id. Specifically, the DIV that keeps the left-hand boxes where they are (wrapping the menu and the button box). See: http://www.pollinger.fslife.co.uk/cacert-redesign/version4-testing.html

Can anyone tell me why this might matter? Or more generally, why we should use id sometimes and why class? I know there is a difference, just wondering why it should matter in cases like this.

Thanks again Tony. I ended up making a copy of my XHTML and CSS files, then going through each and deleting chunks, seeing if it made a difference in IE, then undoing it in my text editor. I finally realised it had something to do with the left hand wrapping DIV, and the class to id change did it!

regards,
Ben

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 day 21 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

a:hover problem in IE6

Hi Ben,
Good job, it works fine now.

ID's should be unique, only one element with the specific id to a page.
Classes are more general and can be applied to multiple elements.

Hope that helps.