2012-03-07 110 views
0

如圖這一pageDIV浮動問題

我已經嘗試了所有我能做出標誌,以顯示在頂部的幻燈片的溢流的一部分,但它是行不通的。 CSS如下所示。

#logo { 
    float: left; 
    position: absolute; 
    margin-top: -58px; 
    width: 250px; 
    margin-left: -52px; 
} 

.clear { 
    clear:both 
} 

#gallery { 
    width: 100%; 
    float: left; 
    margin-bottom: -28px; 
    position: absolute; 
    height: 509px; 
} 
    #gallery a { 
     float:left; 
     position:absolute; 

    } 

    #gallery a img { 
     border:none; 
     width: 100%; 
     float: left; 
     position: absolute; 
     margin-bottom: -28px; 
    } 

    #gallery a.show { 
    z-index:500; 
    width: 100%; 
    position: absolute; 
    margin-bottom: -28px; 
    height: 509px; 
    float: left; 
    } 

    #gallery .caption { 
     z-index:600; 
     background-color:#000; 
     color:#ffffff; 
     height:100px; 
     width:100%; 
     position:absolute; 
     bottom:0; 
    } 

    #gallery .caption .content { 
     margin:5px 
    } 

    #gallery .caption .content h3 { 
     margin:0; 
     padding:0; 
     color:#1DCCEF; 
    } 

回答

3

只需添加z-index爲您的徽標id,那麼它應該工作。您的徽標的一半坐在滑塊後面。

#logo { 
    float: left; 
    position: absolute; 
    margin-top: -58px; 
    width: 250px; 
    margin-left: -52px; 
z-index:599; 
} 
+0

非常感謝。有效;但是請讓我知道你是怎麼想出599的 – 2012-03-07 23:41:08