{"id":376307,"date":"2023-01-10T07:11:20","date_gmt":"2023-01-10T15:11:20","guid":{"rendered":"https:\/\/css-tricks.com\/?p=376307"},"modified":"2023-01-10T07:11:24","modified_gmt":"2023-01-10T15:11:24","slug":"faking-min-width-on-a-table-column","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/faking-min-width-on-a-table-column\/","title":{"rendered":"Faking Min Width on a Table Column"},"content":{"rendered":"\n

The good ol\u2019 <table><\/code> tag is the most semantic HTML for showing tabular data. But I find it very hard to control how the table is presented, particularly column widths in a dynamic environment where you might not know how much content is going into each table cell. In some cases, one column is super wide while others are scrunched up. Other times, we get equal widths, but at the expense of a column that contains more content and needs more space.<\/p>\n\n\n\n

But I found a CSS tricks-y workaround that helps make things a little easier. That\u2019s what I want to show you in this post.<\/p>\n\n\n\n\n\n\n

The problem<\/h3>\n\n\n

First we need to understand how layout is handled by the browser. We have the table-layout<\/code><\/a> property in CSS to define how a table should distribute the width for each table column. It takes one of two values:<\/p>\n\n\n\n