2011-06-27 20 views
0

我得到了這個搜索「asyoutype」,結果是supose顯示所有的命中,現在的問題是,它不會越過「容器」div包裝搜索和菜單。我嘗試了不同的立場,沒有成功,有人有任何想法?讓我知道如果我需要更新信息。我如何得到這個div去其他div

這是我的asyoutype CSS resultdiv

.searchResult 
{ 
    background: #fff; 
    text-align: left; 
    line-height: 1.5em; 
    width: 265px; 
    z-index: 10000; 
    display: none; 
    float: left; 
    clear: both; 
    box-shadow: 0 3px 5px #333; 
    -moz-box-shadow: 0 3px 5px #333; 
    -webkit-box-shadow: 0 3px 5px #333; 
    position: absolute; 
    right: 40px; 
    top: 36px; 
} 

這是容器標題(HTML5)

header.main { 
    -moz-border-bottom-colors: none; 
    -moz-border-image: none; 
    -moz-border-left-colors: none; 
    -moz-border-right-colors: none; 
    -moz-border-top-colors: none; 
    background: -moz-linear-gradient(center top , #F4F4F4, #D1D1D1) repeat scroll 0 0 #E4E4E4; 
    border-bottom-left-radius: 2px; 
    border-bottom-right-radius: 2px; 
    border-color: #C7C8C8; 
    border-style: solid; 
    border-width: 0 1px; 
    margin: 0 0 22px; 
    overflow: hidden; 
    position: relative; 
} 

enter image description here

+0

我們可能需要在您的服務器上看到更多代碼,jsfiddle或示例。 @Sandeep:使用z-index屬性怎麼樣? – Kyle

回答

0

我想這.searchResult生活在header.main在DOM。因爲header.mainoverflow: hidden,所以.searchResult消失。您應該將.searchResult移出您的HTML中的header.main,或者刪除overflow: hidden指令。

+0

是溢出:隱藏固定它。現在我只需要如果刪除它會導致任何其他問題。謝謝 –

+0

我想它是用來清理浮動的div,有很多其他的方法來解決這個問題:http://www.positioniseverything.net/easyclearing.html – Bjorn

+0

是的,這是它,嗯似乎沒問題。偉大的鏈接生病看看。 –