Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set column width on th, td, or both?

Using CSS, I want to specify certain widths for columns in a table. Should I set the widths in the thead (on the th's), in the tbody (on the td's)...or both?

like image 752
jbyrd Avatar asked Mar 09 '26 17:03

jbyrd


1 Answers

The <th>'s would be the best place to set the width, because it is iterated only once.

Save your client a few bytes.

The other <td>'s will shape out implicitly.

like image 144
Pinch Avatar answered Mar 11 '26 07:03

Pinch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!