Home >Web Front-end >CSS Tutorial >Issues with CSS controlling text automatic line wrapping_Experience exchange
When using tables for web page layout, they can generally be used normally. Sometimes we encounter a phenomenon where a continuous English word or a bunch of exclamation marks (!!!) stretch the web page: (
To summarize, as long as the following sentences are defined in CSS, the web page can be protected. It will not be stretched again.
table{table-layout: fixed;}
td(word-break: break-all; word-wrap:break-word;)
Comments:
1. The first table{table-layout: fixed;}, this style allows the table to automatically wrap when there are characters such as!!! (exclamation point).
2.td{word-break: break-all}, generally it is OK to use this sentence, but in some special circumstances it will still break, so you need to add the following sentence (word-wrap: break-word; ) can be solved. This style can make some consecutive English words in the table automatically wrap.