for block-level elements such as P,p
line breaks for normal text (Asian and non-Asian text) elements have a default white-space:normal, which wraps after the defined width:
Html<p id= "Wrap" > Normal text Wrapping (Asian and non-Asian text) elements have the default white-space:normal when defined </p> css#wrap{white-space:normal; width:200px; }
1. (IE) consecutive English characters and Arabic numerals, using Word-wrap:break-word; or word-break:break-all; implement force break
#wrap {word-break:break-all; width:200px;}
Or
#wrap {word-wrap:break-word; width:200px;} <p id= "Wrap" >abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111</p>
Effect: line wrapping can be implemented
2. (Firefox browser) consecutive lines of English characters and Arabic numerals, all versions of Firefox do not solve this problem, we only let the characters beyond the boundary hide or add a scrollbar to the container
#wrap {word-break:break-all; width:200px; overflow:auto;} <p id= "Wrap" >abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111</p>
Effect: Container normal, content hidden
for Table
1. (IE) use table-layout:fixed; Force table width, excess content hidden
<table style= "table-layout:fixed" width= ">" <tr><td> Abcdefghigklmnopqrstuvwxyz1234567890ssssssssssssss</td></tr></table>
Effect: Hide Excess content
2. (IE) use table-layout:fixed, force the width of table, inner layer td,th adopt word-break:break-all; or Word-wrap:break-word; line break
<table width= "" "style=" table-layout:fixed; " > <tr><td width= "25%" style= "Word-break:break-all; ">abcdefghigklmnopqrstuvwxyz 1234567890</td><td style=" Word-wrap:break-word; >ABCDEFGHIGKLMNOPQRSTUVWXYZ 1234567890</td></tr></table>
Effect: can be changed line
3. (IE) nested p,p in td,th, etc. using the p,p of the above mentioned line-wrapping method
4. (Firefox browser) use table-layout:fixed, force table width, inner layer td,th adopt word-break:break-all; or Word-wrap:break-word; line break, Use Overflow:hidden; hide beyond content, here Overflow:auto; not working
<table style= "table-layout:fixed" width= "$" > <tr><td width= "25%" style= "Word-break:break-all; Overflow:hidden; ">abcdefghigklmnopqrstuvwxyz1234567890</td><td width=" 75% "style=" Word-wrap:break-word; Overflow:hidden; ">abcdefghigklmnopqrstuvwxyz1234567890</td></tr></table>
Effect: Hide more than content
5. (Firefox browser) in td,th nested p,p, etc. use the above mentioned method of dealing with Firefox to run the Code box. Finally, the chances of this happening are very small.