html - Fixed Table Cell Width -
a lot of people still use tables layout controls, data etc. - 1 example of popular jqgrid. however, there magic happening cant seem fathom (its tables crying out loud, how magic there possibly be?)
how possible set table's column width , have obeyed jqgrid does!? if try replicate this, if set every <td style='width: 20px'>
, content of 1 of cells greater 20px, cell expands!
any ideas or insights?
you try using <col>
tag manage table styling rows need set table-layout:fixed
style on <table>
or tables css class , set overflow
style cells
https://developer.mozilla.org/en-us/docs/web/html/element/col
<table class="fixed"> <col width="20px" /> <col width="30px" /> <col width="40px" /> <tr> <td>text</td> <td>text</td> <td>text</td> </tr> </table>
and css
table.fixed { table-layout:fixed; } table.fixed td { overflow: hidden; }
Comments
Post a Comment