http://jsfiddle.net/L83y3/
HTML
<table>
<tr>
<td>stuff</td>
<td class="right">more stuff</td>
</tr>
</table>
CSS
table
{
border:10px solid green;
}
td
{
padding:20px;
background-color:gray;
}
.right
{
position:relative;
}
has a solid uninterrupted green border for Chrome 13, Safari 5, IE7 but results in this for IE9, IE8, FF5, FF4, FF3.6
How can I get a solid border all the way around, but still have position:relative
in the right cell?
Background clipping just did the trick.
Just apply "background-clip: padding-box;"
on the th
and it works.
according to the docs: https://developer.mozilla.org/en-US/docs/Web/CSS/background-clip.
"No background is drawn below the border (background extends to the outside edge of the padding)."
Apply z-index:-1;
jsfiddle: http://jsfiddle.net/thilakar/L83y3/1/
.right
{
position:relative;
z-index:-1
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With