Home > Article > Web Front-end > How to Wrap Text in a Table Data Element Without White Space?
Wrapping Text in a Table Data Element Without White Space
When attempting to wrap text within a table data element (
Fortunately, there is a more comprehensive solution:
.wrapword { white-space: -moz-pre-wrap !important; white-space: -webkit-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word; word-break: break-all; white-space: normal; }
This CSS code ensures that text wraps seamlessly by overriding the default behavior of browsers. Here's how to use it:
<table>
With this approach, text will wrap appropriately in Firefox and other browsers.
The above is the detailed content of How to Wrap Text in a Table Data Element Without White Space?. For more information, please follow other related articles on the PHP Chinese website!