views:

42

answers:

1
    <div id="nav">
    <ul>
       <li><a href="#"></li>
       <li><a href="#"></li>
       <li><a href="#"></li>
       <li><a href="#"></li>
    </ul>
    </div>

#nav {
 color: #ffffff;
 font-size: 12px;
 font-weight: bold;
 margin-left: 4px;
 position: absolute;
 top: 230px;
 width: 800px;
}

#nav a{
 color: #ffffff;
 text-decoration: none;
}

#nav li {
 display: inline;
 margin: -4px;
 padding-left: 15px;
 padding-right: 15px; 
 padding-top: 19px;
 padding-bottom: 12px;
}

#nav li a {
 background-color: transparent;

}

the code above works fine in firefox with the highlighting filling out the entire "tab" of the navbar. however in ie7 it is off center and not filling up the same way. any ideas ?

+1  A: 

You didn't close your a-tag.

And you should be careful when using padding on inline elements:

http://www.maxdesign.com.au/articles/inline/

vinhboy