English overflow

In the case of automatic line wrapping, the line wrapping of normal characters is more reasonable, while continuous numbers and English characters often stretch the container.
Best CSS to define newline code

.wrap { table-layout:fixed; word-break: break-all; overflow:hidden; }
here overflow:hidden; or auto; for block-level elements such as div and p

The normal text wrapping (Asian and non-Asian text) elements have the default white-space: normal, which automatically wraps after the defined width
1. IE browser) continuous English characters and Arabic numerals, use word-wrap : break- word ; or word-break:break-all; implements forced line break

#wrap{word-break:break-all; width:200px;}
#wrap{word-wrap:break-word; width:200px;}

2. (Firefox browser) Line breaks of continuous English characters and Arabic numerals, all versions of Firefox do not solve this problem, we only have to hide the characters beyond the border or add scroll bars to the container

#wrap{word-break:break-all; width:200px; overflow:auto;}

For table
3. (IE browser) use table-layout:fixed; force the width of the table, the redundant content is hidden; the inner td, th use word-break: break-all; or word-wrap: break-word; line break
4 . (IE browser) Nested div, p, etc. in td, th use the line wrapping method of div, p mentioned above
5. (Firefox browser) Use table-layout: fixed; force the width of the table, the inner td ,th use word-break : break-all; or word-wrap : break-word ; line break, use overflow: hidden; hide the excess content, here overflow: auto; does not work
Reprinted from http://blog.sina.com .cn/s/blog_6221f8120100fprg.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325491342&siteId=291194637