2014-03-03 196 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中之前,请考虑一下这样一个事实,即你很可能最终不得不重做很多你的样式。