开发者

How to make table columns width dynamic? [closed]

This que开发者_StackOverflow中文版stion is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜