开发者

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

开发者 https://www.devze.com 2022-12-25 08:21 出处:网络
I have a table with expand/collapse functionality. How do I enforce fixed width for columns in such a table?

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

精彩评论

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

关注公众号