我的问题是,当我在 Internet Explorer 8 上时,灰色文本框消失了,我尝试了 {top: 0px} 和其他东西,但我无法正确...
预览
http://i265.photobucket.com/albums/ii213/omegakenshin/other/rEdHellCorner.jpg
这是我的代码...
<div class="textboxS">
<img src="images/textbox_corner.png" alt="redCorner" name="redCorner" width="73" height="77" class="redCorner" />
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tbSMain">
</table>
</div>
还有我的 CSS...
.textboxS {
width: 550px;
margin: 30px 0px 0px 220px;
position: relative;
}
.tbSMain {
position: relative;
top: 0px;
margin: 0;
padding: 0;
}
.redCorner {
float: right;
margin: -33px -30px 0px 0px;
}
最佳答案
使用
顶部:0px;
您需要将位置设置为绝对位置:
.tbSMain {
position: absolute;
top: 0px;
margin: 0;
padding: 0;
}
我还建议将 .redCorner 更改为 float: left;并相应地调整边距。负边距会破坏一切。
关于div 内的文本框在 IE 中下降,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3054967/