在 HTML 表格的 <td> 中设置 min-width [英] Set min-width in HTML table's <td>
本文介绍了在 HTML 表格的 <td> 中设置 min-width的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的表有几列.
每列都应具有取决于浏览器窗口大小的动态宽度.另一方面,每一列不能太小.所以我试图为这些列设置 min-width
,但这不是一个有效的属性.也为 <td>
尝试了 min-width
,但这也是一个无效的属性.
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.
有没有办法在 HTML 表格中为 col/td 设置 min-width
?
推荐答案
试试这个:
<table style="border:1px solid">
<tr>
<td style="min-width:50px">one</td>
<td style="min-width:100px">two</td>
</tr>
</table>
这篇关于在 HTML 表格的 <td> 中设置 min-width的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文