[英]CSS box in Internet Explorer
我有一个渲染问题,要在IE8 IE7 IE6中显示带有背景图像和边框图像的框
我的代码可在IE9,Safari,Firefox中使用。
.myBox {
background : url(image-left.gif) left no-repeat,url(image-right.gif) right no-repeat, url(images-center.png) repeat-x;
height: 50px;
position:relative;
}
我已经建立了一种解决方案,可以将左右图像放在表格中:
CSS:
table {
height: 50px;
position:relative;
}
.myBox {
background : url(images-center.png) repeat-x;
}
的HTML:
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="image-left.gif" /></td>
<td>my content text</td>
<td><img src="image-right.gif" /></td>
</tr>
</table>
有人有更好更好的解决方案吗????
这是两种方法
当然,您的方法同样有效,尽管它会导致您更改标记。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.