Home Web Front-end HTML Tutorial The content of td automatically wraps. After setting the width of table table td, there are too many words and automatic wrapping_HTML/Xhtml_Web page production

The content of td automatically wraps. After setting the width of table table td, there are too many words and automatic wrapping_HTML/Xhtml_Web page production

May 16, 2016 pm 04:40 PM
width Automatic line wrapping

设置table 的 style="table-layout:fixed;" 然后设置td的 style="word-wrap:break-word;" 即可

复制代码
代码如下:

<table style="TABLE-LAYOUT: fixed" border="1" cellspacing="0" cellpadding="0" width="200">
<tbody>
<tr>
<td style="WORD-WRAP: break-word" width="20">sssssssssssssssssssssssssssssssssssssssssssssss </td>
<td>aaaaa</td>
</tr>
<tr>
<td style="WORD-WRAP: break-word" width="20">sssssssssssssssssssssssssssssssssssssssssssssss </td>
<td>aaaaa</td>
</tr>
</tbody>
</table>
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to cancel automatic word wrapping in word How to cancel automatic word wrapping in word Mar 19, 2024 pm 10:16 PM

How to cancel automatic word wrapping in word

How to automatically wrap and force wrap WPS tables How to automatically wrap and force wrap WPS tables Mar 20, 2024 pm 07:46 PM

How to automatically wrap and force wrap WPS tables

What are the methods for automatic line wrapping in ireport? What are the methods for automatic line wrapping in ireport? Dec 21, 2023 am 10:22 AM

What are the methods for automatic line wrapping in ireport?

PyCharm tuning: Make automatic line wrapping smarter and more efficient PyCharm tuning: Make automatic line wrapping smarter and more efficient Feb 21, 2024 pm 04:48 PM

PyCharm tuning: Make automatic line wrapping smarter and more efficient

PyCharm Tips: Elegantly Handle Code Automatically Wrapping Problems PyCharm Tips: Elegantly Handle Code Automatically Wrapping Problems Feb 23, 2024 pm 04:18 PM

PyCharm Tips: Elegantly Handle Code Automatically Wrapping Problems

How to set css automatic line wrapping How to set css automatic line wrapping Mar 02, 2021 am 10:52 AM

How to set css automatic line wrapping

How to set table width in HTML? How to set table width in HTML? Sep 06, 2023 pm 11:37 PM

How to set table width in HTML?

What should I do if the css digital text is too long and is hidden? What should I do if the css digital text is too long and is hidden? Sep 29, 2021 pm 05:54 PM

What should I do if the css digital text is too long and is hidden?

See all articles