JSFiddle - React, Tailwind, and code Playground

HTML

<h1>Stretch over a cell</h1>

<table summary="test case" style="">
<tr>
<td id="test"><span>td#test span</span>position: relative;</td>
<td>Lorem ipsum dolor sit amet</td>
<td> consectetur adipiscing elit</td>
<td> Morbi quis ligula</td>
<td> id purus ullamcorper</td>
<td> rutrum quis a</td>
</tr>
</table>

<p>IE 7, 8 &amp; Opera 10.62 take <code>position: relative</code> into account. (The red span matches the width of the first cell.)</p>
<p>Firefox 3.6.10 &amp; Chrome 6 do not. (The red span is stretched all over the page.)</p>

CSS

body { color: black; background: white; }
table { border-collapse:collapse; }
table td { border: 1px solid black; padding: 0; }
td#test { position: relative; }
td#test span { position: absolute; width: 100%; border: 1px solid red; color: red; }