Reputation: 2036
I've a rendering problem to show a box with background image and border image in IE8 IE7 IE6
My code works in 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;
}
I've founded a solution to put left and right image in a table:
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>
Anyone have a better and elegant solution????
Upvotes: 1
Views: 114
Reputation: 195982
Here are two ways to do it
Of-course your method is valid just as well, although it causes you to change your markup..
Upvotes: 1