HTML TD换行文本 [英] HTML TD wrap text

查看:225
本文介绍了HTML TD换行文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想包装一个添加到TD的文本。
我尝试过 style =word-wrap:break-word; width =15%
但是换行没有发生。是否必须给予100%宽度?
我有其他控制显示,所以只有15%的宽度可用。

解决方案

>

首先设置表格样式

  table {
table-layout:固定;
}

然后设置TD Style

  td {
word-wrap:break-word
}


I want to wrap a text that is added to the TD. I have tried with style="word-wrap: break-word;" width="15%". But the wrap is not happening. Is it mandatory to give 100% width? I have other controls to display so only 15% width is available.

解决方案

To Wrap TD text

First set table style

table{
    table-layout: fixed;
}

then set TD Style

td{
    word-wrap:break-word
}

这篇关于HTML TD换行文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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