Home > Web Front-end > CSS Tutorial > css text wrapping properties word-wrap and white-space

css text wrapping properties word-wrap and white-space

高洛峰
Release: 2016-11-24 13:53:42
Original
1709 people have browsed it

Today I came across a problem where td text content does not wrap. I found out: white-space: nowrap, which forces the text to not wrap. By the way, I took a look at the word-wrap attribute of text wrapping. The summary is as follows:

The default of white-space is just normal , automatically wrap lines.

word-break:break-all and word-wrap:break-word represent forced line breaks. The former will automatically truncate if the English characters are too long, and the latter will wrap the entire English word!

And I often use it like this:

word-wrap:break-word; overflow:hidden;

There is no problem under IE, but under FF, long English strings will be covered with excess content

td in table .th forced line break method:






php diandiantong (www.phpddt.com) original tutorialphp diandiantong (www.phpddt.com) original tutorial


Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template