IE6 ignoring active link CSS style

Posted by Leah on Stack Overflow See other posts from Stack Overflow or by Leah
Published on 2009-02-15T23:01:56Z Indexed on 2010/06/03 10:24 UTC
Read the original article Hit count: 279

Filed under:
|

The CSS active link style is being correctly applied in IE7, FF, and Safari but is not applied IE6.

.side_nav a.active 
{
    color:#FFFFFF;
    background-color:#9F1F63;
}

Interestingly the background color (background-color:#9F1F63;) is being applied in IE6 but not the font color (color:#FFFFFF;)

Any ideas on why this is happening and how I can fix it appreciated.

The complete styling for the nav below:

.side_nav 
{
    text-align : left;
    margin-left: -10px;
}

.side_nav ul 
{
    list-style-type: none;
    list-style-position:inside;
    margin-left:0px;
}
.side_nav li 
{
    margin-top: 10px;
    display: list-item;
    list-style-type:none;	
}
.side_nav a, .side_nav a:visited
{
    text-decoration: none;
    color : #9F1F63;
    font-weight : bold;
    padding: 5px 10px 5px 10px;		
}
.side_nav a:hover 
{
    color:#B26D7F;
}
.side_nav a.active 
{
    color:#FFFFFF;
    background-color:#9F1F63;
}

EDIT: Thanks but the suggestions haven't helped. When I change to a:active the active effect does not work in any browser. I think this might be due to how I have applied the style in the HTML.

    <div class="side_nav">
        <a class="active" href="Page1.aspx">Page1</a><br />
        <a href="Page2.aspx">Page2</a><br />
        <a href="Page3.aspx">Page3</a><br />
    </div>

© Stack Overflow or respective owner

Related posts about html

Related posts about css