Set min-width in HTML table's <td>

Thanhma San picture Thanhma San · Aug 29, 2013 · Viewed 167.1k times · Source

My table has several columns.

Each column should have dynamic width that depends on the browser window size. On the other hand, each column must not be too tiny. So I tried to set min-width for those columns but it's not a valid property. Tried min-width for <td> as well but that too is an invalid property.

Is there any way to set min-width for col/td in HTML table?

Answer

Ali Sağırvelioğulları picture Ali Sağırvelioğulları · Aug 29, 2013

try this one:

<table style="border:1px solid">
<tr>
    <td style="min-width:50px">one</td>
    <td style="min-width:100px">two</td>
</tr>
</table>