1

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????

1 Answer 1

1

Here are two ways to do it

Of-course your method is valid just as well, although it causes you to change your markup..

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.