Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


Resize table cell to content using CSS

If you wish to resize a table cell to fit its content, use the following CSS code:

td {width:1%; white-space:nowrap; padding:0px 5px 0px 5px;}

Be sure to have at least one free size cell if the table has defined width


Enter your comment:
A P᠎ T J P
development/css/resize_cell.txt · Last modified: 2019/10/31 09:04 (external edit)