我正在尝试解决 IE7 中的这个问题,即当您将鼠标悬停在它上面时,它不会保持在原来的位置,而是会转到左侧。我试过 display:inline 但在这种情况下它不起作用。
你可以在这里测试它:http://www.sneakyrascal.com/kayak/results.html
这是我用于主箱(中间那个)的代码:
.results #container{
float:left;
width: 527px;
margin:38px 0 0 20px;
padding-left:1px;
position: relative;
border: #ccc 1px solid;
background: #fff;
}
提前致谢
最佳答案
问题是由 #main-content
上的 position:relative
引起的。如果你删除它,容器将不会再跳动:
#main-content {
margin-top: 20px;
position: relative; /* delete this */
}
您可能还注意到您的 .sites
div 没有正确排列。添加 left: 0
将解决这个问题:
.results #container UL LI.box .left-side .sites{
width: 90px;
text-align: center;
position: absolute;
bottom: 10px;
left: 0; /* add this */
}
关于html - IE7 错误 - 主框在悬停时向左移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7505772/