我有以下问题:
我的css如下:
.SPImage img
{
margin-top:-15px;
float:left;
white-space:normal;
width:194px;
height:149px;
}我的HTML如下:
<DIV id=SPImage class=SPImage>
<DIV style="POSITION: relative; WIDTH: 100%">
<IMG style="WIDTH: 165px; MARGIN-LEFT: 15px" title="test" alt="test" src="/resources/2710004.jpg">
</DIV>
</DIV>我在HTML head标签中有以下设置:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />我的问题是,当我使用IE 8的时候,当我使用IE7和IE8的兼容性时,我的图像由于margin-top:-15px;而提升到15px,它看起来还可以。我不能删除margin-top:-15px;,因为它在IE7中看起来会很难看。

我该如何解决这个问题?
发布于 2011-08-26 23:59:06
当我这样做的时候:
CSS:
.SPImage img {
margin-top:-15px;
float:left;
white-space:normal;
width:194px;
height:149px;
}HTML:
<DIV id="SPImage" class="SPImage">
<IMG style="WIDTH: 165px; MARGIN-LEFT: 15px" title="test" alt="test" src="img url">
</DIV>在IE 7,IE 8,IE9,Chrome和FF中看起来是一样的吗?
https://stackoverflow.com/questions/6640667
复制相似问题