Firefox 3.6和Firefox 4之间的水平导航CSS差异

时间:2011-06-15 16:40:27

标签: css firefox cross-browser firefox4

在FF4中,“联系我们”链接显示在页面顶部水平导航栏中我的“主页”链接下面。 avaline .com(以及该域名下的所有页面)。在FF 3.6中,它看起来很好,适合900px宽度的ul元素。

我希望我能在浏览器中更好地使用它?

<ul id="nav2">
      <li><a href="/" title="promotional products home">home</a></li>
      <li><a href="/Information/Product-Testing-Library" title="product safety">product safety</a></li>
      <li><a href="/Current_Specials?loc=top" title="current promotional product specials">current specials</a></li>
      <li><a href="/Marketing-Tools/2011-Digital-Catalog-and-Request-Form" title="digital and request catalog">request catalog</a></li>
      <li><a href="/Marketing-Tools?loc=top" title="marketing tools">marketing tools</a></li>
      <li><a href="/Information/About-Us" title="about us and our promotional products">about us</a></li>
      <li><a href="/Contact-Us" title="Contact us about our promotional products">contact us</a></li>
    </ul>


#header_top ul#nav2 {
    margin: 0;
    padding: 0;
    list-style: none;
    position: absolute;
    top: 79px; /* was 80px ll */
    width: 900px; /* was 776 ll */
    left: 7px; /* was 64px */
    font-family: Arial, Helvetica, sans-serif;
}
#header_top ul#nav2 li {
    float: left;
    font-weight: bold;
    padding: 0 23px;
    font-size: 11px;
    list-style:none;
}
#header_top ul#nav2 li a {
    color: #fff;
    text-transform: uppercase;
}
#nav3 a, #nav3 a a:link, #nav3 a a:visited, #nav2 li a, #nav2 a a:link, #nav2 li a a:visited, #nav1 li a, #nav1 a a:link, #nav1 li a a:visited {text-decoration: none;} 

#nav3 a:hover, #nav3 a:active, #nav2 li a:hover, #nav2 li a:active, #nav1 li a:hover, #nav1 li a:active {text-decoration:underline;} /* ll */

1 个答案:

答案 0 :(得分:0)

在Windows7 x64家庭高级版上运行的Firefox(v 4.0.1)上显示正常

然而,我可以在IE9中重现你的'bug',但是通过将li元素的填充更改为21px(而不是23px)可以很容易地解决这个问题。

jsFiddle:http://jsfiddle.net/KBgKa/5/