开发者

How to set fixed width for columns of a table with expand/collapse functionality?

I have a table with expand/collapse functionality. How do I enforce fixed width for columns in such a table?

I used COL tags with width property. But the table becomes distorted wh开发者_Python百科en I expand/collapse the rows.


Make sure you set the style table-layout: fixed on the <table> element. By default, even with <col> elements, the browser will go into ‘auto table layout’ mode, where your widths won't necessarily be respected.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜