I want a table inside a <td>
, but I don't want it to resize the <td>
. I want it to over flow to next <td>开发者_C百科;
on the right not but not resize the parent <td>
.
I'm putting it inside a <td>
so it would move with it when the screen is resized.
Try this CSS code on the nested table:
position: absolute;
top: 0;
left: 0;
The parent TD should have:
position: relative;
But again, playing like this with TABLES is not recommended... You may need to nest the table in some DIV because positionning TABLES and TD is tricky.
Just have a single td and use colspan=2 for it. Keep the table left aligned and set its width to auto so that it can freely overflow to the right if it exceeds in size.
But since you've tagged this question under CSS, using tables for presentation and layout isn't a great way to do it.
This should do the trick:
<tr>...
<td colspan="2">
<table>content</table>
</td>
...
</tr>
:)
精彩评论