3

我目前在 Internet Explorer 中遇到两个问题。第一个是我的导航菜单:链接堆叠在一起,而不是穿过栏。这是我的导航菜单代码。

HTML

<div class="main-navigation" role="navigation" style="margin-top: 5px;">
<div class="nav-menu"><ul><li class="page_item page-item-8"><a href="http://tshirthideout.com/design-your-own/">design your own</a></li><li class="page_item page-item-10"><a href="http://tshirthideout.com/fan-photos/">fan photos</a></li><li class="page_item page-item-12"><a href="https://tshirthideout.com/win-a-free-t-shirt/">Win a free T-shirt</a></li></ul></div>
</div><!-- #site-navigation -->

CSS

.main-navigation li {
    margin: 0px 20px 0px 0px;
    position: relative;
    text-align: center;
    padding: 7px 0px;
}

    .main-navigation li ul {
        display: none;
        margin: 0;
        padding: 0;
        position: absolute;
        top: 100%;
        z-index: 1;
    }
    .main-navigation li ul ul {
        top: 0;
        left: 100%;
    }
    .main-navigation ul li:hover > ul {
        border-left: 0;
        display: block;
    }
    .main-navigation li ul li a {
        background: #efefef;
        border-bottom: 1px solid #ededed;
        display: block;
        font-size: 11px;
        font-size: 0.785714286rem;
        line-height: 2.181818182;
        padding: 8px 10px;
        padding: 0.571428571rem 0.714285714rem;
        width: 180px;
        width: 12.85714286rem;
        white-space: normal;
    }
    .main-navigation li ul li a:hover {
        background: #e3e3e3;
        color: #444;
    }
    .main-navigation .current-menu-item > a,
    .main-navigation .current-menu-ancestor > a,
    .main-navigation .current_page_item > a,
    .main-navigation .current_page_ancestor > a {
        color: #cb0000;
        font-weight: bold;
    }

第二个问题是我的两条丝带用于侧栏中的标题。赋予它环绕外观的右下翻盖没有出现。

HTML

<div class="ribbon"><strong>SPECIAL OFFERS</strong></div>

CSS

.ribbon {
padding-bottom: 7px;
padding-top: 8px;
    padding-left: 3px;
    color: #fff;
        text-shadow: 1px 1px 0px #c1c1c1;
        font-size: 15px;font-family:'Century Gothic',futura,'URW Gothic L',Verdana,sans-serif;
        letter-spacing: 5px;
position:relative;
    width:267px;

    right:0px;
    top:19px;
    background-color:#212121;
-moz-border-radius:2px 0px 0px 2px;  /*radius of 2px*/
-khtml-border-radius:2px 0px 0px 2px;
-webkit-border-radius:2px 0px 0px 2px;
-webkit-box-shadow: -2px 2px 4px rgba(50, 50, 50, 0.35);
-moz-box-shadow:    -2px 2px 4px rgba(50, 50, 50, 0.35);
box-shadow:         -2px 2px 4px rgba(50, 50, 50, 0.35);
}
.ribbon:after {
    content:'';
    width:0;
    height:0;

    border-color: #000 transparent transparent #000;
    border-style:solid;
    border-width:5px 5px;

    position:absolute;
    right:0;
    bottom:-10px;
}

此代码适用于其他主要浏览器,但不适用于 IE。

4

1 回答 1

0

对于第一个问题,您应该添加任何您拥有display: inline-block的地方,即

zoom: 1;
*display: inline

更新

.main-navigation div.nav-menu > ul {
        border-bottom: 1px solid #ededed;
        border-top: 1px solid #ededed;
        display: inline-block !important;
            *display: inline
            zoom: 1;

        text-align: center;
        width: 100%;
    }

    .main-navigation li a,
    .main-navigation li {
        display: inline-block;
            *display: inline
            zoom: 1;
        text-decoration: none;

    }

从您提供的链接

于 2013-03-06T16:43:42.490 回答