2014-03-03 200 views
1

懸停改變IE11瀏覽http://happyhourproductions.co.uk/tv-commercial-production.html,當我遇到一些麻煩的利潤。利潤率IE11

下「更多類似這樣的」關於此頁面的右側部分,如果你將鼠標懸停在任前兩個鏈接的圖像相關的利潤率將出現改變。關閉光標不會改變它,但將光標移動到該列中的任何其他鏈接上即可。

我想這可能是這個錯誤:http://haslayout.net/css/Percentage-Padding-Margin-Bug但既不這些解決方案的工作。

我也發現了這個問題,這也可能是相同的,但沒有任何解決辦法:IE9 img hover add's margin to bottom

這裏是CSS,它使用Twitter引導和更少,如果這是很重要建?

.work .sidebar .morelikethis { 
    border-bottom: 1px solid #FFFFFF; 
    border-top: 1px solid #FFFFFF; 
    margin-bottom: 10.2564%; 
    margin-top: 7.69231%; 
    overflow: auto; 
} 

這裏是HTML

<h2>More like this...</h2> 
<p> 
<a class="morelikethis" title="DRTV Commercials" href="drtv-production-company.html"> 
</p> 
<p> 
<a class="morelikethis" title="Animation" href="animation-production.html"> 
</p> 
<div class="newsflash"> 
<a href="/news/2013/05/happy-hour-productions-launches-new-quickquid-drtv-advertising-campaign/"> 
</div> 
+0

這感覺就像一個IE漏洞,但有你在這裏使用百分比具體原因是什麼?根據[w3.org](http://www.w3.org/TR/2011/REC-CSS2-20110607/box.html#margin-properties)的保證金百分比計算該塊的寬度,頂部和底部。它似乎不像側邊欄的寬度發生變化,爲什麼不設置固定的邊距呢? – dtyler

回答

0

你的問題是由IE11的默認CSS引起的。您可以通過所有的邊緣設置爲「morelikethis」解決這個問題:

.morelikethis:hover { 
    margin-left: some value; 
    margin-right: some value; 
    margin-bottom: 10.2564%; 
    margin-top: 7.69231%; 
} 

把它縮短:

.morelikethis:hover { 
    margin: top right bottom left; 
} 

另外,我建議使用一個CSS復位,使得瀏覽器的默認CSS沒有按」與造型混亂。這是一個很好的例子:https://code.google.com/p/reset5/在將這個腳本包含在你的CSS中之前,請考慮一下這樣一個事實,即你很可能最終不得不重做很多你的樣式。