How to make table columns width dynamic? [closed]
How can I make table column width change dynamically according to the data inside the columns? (I define table width 100% because that the columns width behave different).
It sounds like you're looking for the nowrap
attribute for a td
element. More information here. Something like this:
<table>
<tr>
<td nowrap>
This is a long sentence which constitutes a lot of data that shouldn't wrap when rendered.
</td>
</tr>
</table>
Demonstrated here.
It is by default...that it set the column width according to column content, it sets to maximum content length in that particular column.
精彩评论