Monica Negapatan
Monica Negapatan

Reputation: 251

IE6 Selectors issues

My site actually works okay in other browsers but when I checked in IE6, there is a problem. In my global navigation, I clicked this certain page. For example, I clicked ABOUT ME page. My global navigation changes its image when the page is active. Like it has a different color from inactive pages. In IE6, when I'm in the current page, ABOUT ME, the current image in the global navigation is different. Say, it's CONTACT US. But when hovered, the image that appears is correct.

This is the snippet of CSS:

    .cat-item-5 {

    float: left;

    display: inline;

    width: 162px;

    height: 48px;

    text-indent: -30000px;

    background: -639px 0 url(images/menu.png) no-repeat;

}



.cat-item-5 a {

    display: block;

    width: 162px;

    height: 48px;

    background: -639px 0 url(images/menu.png) no-repeat;

}



.cat-item-5 a:hover,

.cat-item-5.current-cat a {

    background: -639px 0 url(images/menu_o.png) no-repeat;

}

Hope you can help me, thanks!

Upvotes: 2

Views: 53

Answers (1)

Spudley
Spudley

Reputation: 168655

IE6 has really really bad CSS support. It also has some nasty little bugs, of which you've been tripped up by one.

The bug is that when you have a double-class selector like .cat-item-5.current-cat, IE6 will only see the first of those classes, so it acts as if the selector is just .cat-item-5.

There's no good way around this bug. The only solution is to add another class to the relevant elements, and select that instead.

Your only other option is to simply drop support for IE6.

Upvotes: 2

Related Questions