2011-11-15 29 views
3

我有一個網格li的所有左側固定的寬度/高度。問題是,當我懸停在該中心最新的產品,這將在下裏的CSS相對和絕對,忽略z-index

編輯/突破下,顯示在沒有放置在頂部,坐在DIV: 如果我卸下的Z-index相對li這適用於除IE7以外的所有瀏覽器

+1

在z-index上查找一些IE7細節。但是,如果t在所有主要borwsers中工作,IE7用戶可以承受(他們應該在幾年前升級) – Kyle

回答

1

嘗試在你的productOver功能改變徘徊LI的Z-指數,使其大於它的兄弟姐妹,就像這樣:

function productOver(){ 
    var product_html = $(this).find(".product_html"); 
    // Generate HTML only on first hover. 
    if(product_html.data("generated") != true){ 
    var tis = $(this); 
    product_html.find(".name").html(tis.find("h2").html()); 
    product_html.find(".price").html(tis.find(".price").html()); 
    product_html.data("generated", true); 
    } 
    $(this).css('z-index','10'); //add this 
    product_html.stop().fadeTo('fast', 1).show(); 
} 

當然,並將其設置回它的默認上productOut

function productOut(){ 
    $(this).css('z-index', '8'); //add this 
    $(this).find(".product_html").stop().fadeTo('slow', 0, function() { 
    $(this).hide(); 
    }); 
} 
+0

我在我腦海中複雜化了,這個工作讓布里爾感謝 –

0

z-index: 1;放到底部行LIs和更高的z-inded到所有出現在懸停上的元素。這應該讓你開始。

+0

每個'LI'已經有一個Z-索引:8,懸停時出現的元素有Z-索引:999 –

+0

我知道,但給他們z-index:1爲我修好了。 – Shomz