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

发布于 2024-11-15 23:44:30 字数 1870 浏览 5 评论 0原文

在 FF4 中,“联系我们”链接出现在 www 页面顶部水平导航中的“主页”链接下方。 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 */

In FF4, the "Contact Us" link appears under my "Home" link in the horizontal navigation at the top of the page at www. avaline .com (and on all pages under that domain). In FF 3.6 it looks fine and fits within the 900px width ul element.

What am I missing to get this to work better across browsers?

<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 */

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笑饮青盏花 2024-11-22 23:44:30

它在 Windows7 x64 Home Premium 上运行的 Firefox(v 4.0.1)上看起来很好,

但是,我可以在 IE9 中重现您的“错误”,但是通过将 li 元素的填充更改为 21px(而不是 23px),可以轻松解决此问题)。

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

It appears fine on my Firefox (v 4.0.1) running on Windows7 x64 Home Premium

I could, however, reproduce your 'bug' in IE9, however this was easily fixed by changing the padding of the li element to 21px ( instead of 23px ).

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文