2012-05-23 44 views
0

我有側邊欄的高度問題..我使用jQuery的衡量內容的高度,然後添加此高度,側邊欄顯示欄陰影。但它在IE中給出了問題。CSS身高問題

網站的這個鏈接是:http://www.norwichkitty.com/business-directory/

請檢查左側欄的陰影問題..

$(document).ready(function() { 
    var blockheight = $('.right-content').height(); 
    $('.sidebar').css('height', blockheight); 
}); 

及其CSS觀點是

element.style { 
    height: 1592px; 
} 
.sidebar { 
    background: url("../img/sidebar-shadow.png") repeat-y scroll right center transparent; 
    float: left; 
    height: 100%; 
    overflow-y: auto; 
    position: relative; 
    width: 305px; 
    z-index: 999999; 
} 

如果有任何解決這個問題的CSS解決方案..請讓我知道..

謝謝大家

+0

你爲什麼要使用的位置是:相對的,這裏的z-index? –

+0

我只是想解決身高問題.. –

+0

你清理你的浮標? –

回答

0

您可以將圖像加寬到側欄的寬度,然後將其作爲整個表格的背景圖像然後,無論內容的高度如何,重複的側欄圖像y軸。

background: url(LINK_TO_IMAGE.png) repeat-y; 

(PS是沒有任何理由是必須有一個表?)