0

ナビゲーションを入れると背景画像がie8ie7に入っていません。他のすべてのブラウザは問題ありません。以下のコードを追加しました。誰かが私がこれを修正するのを手伝ってくれますか?/

<nav class="navigation">
        <ul>
            <li><a href="http://www.ticketstosrilanka.co.uk/" >Home</a></li>
            <li><a  href="cheap-flights-to-colombo-sri-lanka.php">Flights</a></li>
            <li><a href="destination.php" class="active">Travel Guide</a></li>
            <li><a href="holidaytours.php">Tours & Holidays</a></li>
            <li><a href="aboutus.php">About us</a></li>
            <li><a href="contactus.php">Contact Us</a></li>
        </ul>
    </nav>

.navigation {
    margin: 0px 0;  
    font: bold 12px/18px "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-transform: uppercase;
    color: #444;
    width:100%;
    background: url("../images/menubg.png")repeat-x scroll left top transparent;
    -webkit-box-shadow: 0 1px rgba(255,255,255,1) inset;


}

.navigation:after {
    clear: both;
    content: ".";
    display: block;
    height: 0;
    visibility: hidden;
}

.navigation ul {    
    float: left;
    border-radius: 0px;
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.07);
    -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.07);
    overflow: hidden;

}

.navigation li {
    float: left;
    border-style: solid; 
    border-width: 1px;
    border-color: #BABABA #BABABA #BABABA #FFF;
    box-shadow: 0 1px rgba(255,255,255,1) inset;
    -webkit-box-shadow: 0 1px rgba(255,255,255,1) inset;
    background: #F7F7F7; /* Old browsers */
    background: -moz-linear-gradient(top, #F7F7F7 0%, #EDEDED 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F7F7F7), color-stop(100%,#EDEDED)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #F7F7F7 0%,#EDEDED 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #F7F7F7 0%,#EDEDED 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #F7F7F7 0%,#EDEDED 100%); /* IE10+ */
    background: linear-gradient(top, #F7F7F7 0%,#EDEDED 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F7F7F7', endColorstr='#EDEDED',GradientType=0 ); /* IE6-9 */    
}

.navigation li:hover, navigation li.current {
    box-shadow: 0 1px rgba(255,255,255,0.2) inset;
    -webkit-box-shadow: 0 1px rgba(255,255,255,0.2) inset;
    border-color: #262626 !important;
    background: #4D4D4D; /* Old browsers */
    background: -moz-linear-gradient(top, #4D4D4D 0%, #262626 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4D4D4D), color-stop(100%,#262626)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #4D4D4D 0%,#262626 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #4D4D4D 0%,#262626 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #4D4D4D 0%,#262626 100%); /* IE10+ */
    background: linear-gradient(top, #4D4D4D 0%,#262626 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4D4D4D', endColorstr='#262626',GradientType=0 ); /* IE6-9 */
}


.navigation a {
    display: block;
    padding: 10px 15px;
    color: #444;
    text-decoration: none;
    text-shadow: 0 1px #FFF;
}
.navigation  a.active{
    box-shadow: 0 1px rgba(255,255,255,0.2) inset;
    -webkit-box-shadow: 0 1px rgba(255,255,255,0.2) inset;
    border-color: #262626 !important;
    background: #4D4D4D; /* Old browsers */
    background: -moz-linear-gradient(top, #4D4D4D 0%, #262626 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4D4D4D), color-stop(100%,#262626)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #4D4D4D 0%,#262626 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #4D4D4D 0%,#262626 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #4D4D4D 0%,#262626 100%); /* IE10+ */
    background: linear-gradient(top, #4D4D4D 0%,#262626 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4D4D4D', endColorstr='#262626',GradientType=0 ); /* IE6-9 */
    color:#fff;
}

.navigation a:hover, #navigation li.current a {
    color: #FFF;
    text-shadow: 0 1px #000;
}

.navigation li:first-child {
    border-left-color: #BABABA;
    border-radius: 0px 0 0 0px;
}

.navigation li:last-child {
    border-radius: 0 0px 0px 0;
}
4

2 に答える 2

0

これに追加float: left;するだけ.navigationで問題が解決する場合がありますが、そうでない場合は、追加してみてください

* html .navigation{height: 1%;}

于 2013-03-22T06:57:38.817 に答える
0

これを追加します

    .navigation {
        background: url("../images/menubg.png") repeat-x left top; // add this line
background: url("../images/menubg.png")repeat-x scroll left top transparent; // remove this line
    }

ライブデモ

于 2013-03-22T06:09:28.423 に答える