更改HTML列宽时出现问题 [英] Problem changing HTML column width

查看:68
本文介绍了更改HTML列宽时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要管理一些列宽,而我是直接在TH上做到的

我使用< th width = 10%> Name</th>
更改列宽
这样做很好,问题是,如果文本不能容纳在该10%的空间中,则列宽会增加.我该如何控制?我真正想要的是设置一个最大宽度值,如果该文本不适合该10%的空间,则将文本分为两行.

I need to manage some column widths, and I was doing that directly on TH

I change column width using <th width=10%>Name</th>

That works fine, the problem is, if the text does not fit in that 10% space, the column width is increased. How can I control that? What I really want is to set a max width value, and text split into two lines of the field if does not fit in that 10% space.

推荐答案

找到了它

表格布局:固定

:)
Found it

table-layout:fixed

:)


这篇关于更改HTML列宽时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆