Automatically wrap word-break: Break-all and word-wrap: Break-word

Source: Internet
Author: User
Word-break: indicates the automatic line feed in the break-all word. If a word is too long
Word-wrap: Break-word if a word is long and does not wrap automatically
<H: panelgrid id = "grid3" styleclass = "panelgrid" columns = "2">
<H: outputtext value = "target location:" styleclass = "outputlabel"> <H: outputlink value = "javascript:;" onclick = "opentargeturl (); Return false;">
<H: outputtext value = "#{assetplanbean.showdetailrow.tar getlocation}" style = "word-break: Break-all" styleclass = "outputtext"> </H: outputlink>
</H: panelgrid>

Word-break: Break-all and word-wrap: Break-word can automatically wrap the content of a container such as Div.
Their differences are:
1. Word-break: Break-ALL: for example, if the DIV width is PX, its content will be automatically wrapped in PX. If the end of the line has a long English word (congratulation, etc ), it truncates the word and converts it to the backend part of the row whose end is CONRA (congratulation) and the next row is tulation (conguatulation.
2. Word-wrap: the break-word example is the same as above, but the difference is that it regards the entire word congratulation as a whole. If the end width of the row is insufficient, it automatically puts the entire word in the next line, instead of truncating the word.

Word-break; break-all supported versions: ie5 and above are the same as normal in the Asian language. It also allows non-Asian text lines to be broken in any word. This value is suitable for Asian texts that contain non-Asian texts.
Word-wrap: Break-word supported version: ie5.5 and above will be wrapped in the boundary. If necessary, the line feed (Word-break) also occurs.

Also, when I was working on the kingcms template, I met the easyarticle [LIST] (this is a file contained in version 5.0) page. This page is a list of articles, with a (King: Description Size = "200"/) label, that is, its description is 200 characters, because the default template is larger than the content Div container, it can be displayed normally, but when the size is set to 400 and exceeds the content Div container, the content in the right column is pushed down to the bottom, so you can set word-wrap: Break-word in the class to solve this problem.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.