Is it possible to absolute position table cell (td) relative to table row (tr) containing that td.
For example consider html as below:
<table>
<tr>
<td>tr1 td 1</td>
<td>tr1 td 2</td>
<td class="last">tr1 td 3</td>
</tr>
<tr>
<td>tr2 td 1</td>
<td>tr2 td 2</td>
<td class="last">tr2 td 3</td>
</tr>
<tr>
<td>tr3 td 1</td>
<td>tr3 td 2</td>
<td class="last">tr3 td 3</td>
</tr>
</table>
and css as below:
tr{position:relative}
td.last{ position:absolute; left: 10px; top: 40px}
In above example, can I take out last td from tr and absolute position it relative to tr.
Edit: Its working in Firefox Version 33.0, but not working in Chrome Version 38. In chrome td positioned with respect to table and not with tr.
Please check the jsfiddle at http://jsfiddle.net/n5s53v32/2/ .
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…