CSS implementations force no line break/wrap/Force Wrap

Source: Internet
Author: User

Force do not wrap div{white-space:nowrap; automatic line wrapping div{word-wrap:break-word; wo


Force No Line wrapping
div{
White-space:nowrap;
}
Wrap Line
div{
Word-wrap:break-word;
Word-break:normal;
}
Force word breaking in English
div{
Word-break:break-all;
}

CSS settings do not change careers:

Overflow:hidden Hide
White-space:normal Default
PRe newline and other whitespace characters will be protected
NoWrap forces all text to be displayed in the same line until the text ends or the BR object is encountered
Original from Webmaster Network
To set the line breaking:
Word-break:
normal; Allow line wrapping in words according to the Asian and non-Asian language text rules
Break-all: This behavior is the same as normal for Asian languages. Also allows any word in a non-Asian text line to be disconnected. This value is appropriate for Asian text that contains some non-Asian text
Keep-all: Same as normal for all non-Asian languages. For Chinese, Korean, Japanese, word is not allowed to break. Suitable for non-Asian texts containing a small amount of Asian text and a high resolution between

Do not wrap in English
CSS add word-break:break-all; problem solving. The problem is only IE, in the FF test, FF can add their own scroll bar, so it does not affect the effect of the
suggest that you do skin, remember in the body Riga Word-break:break-all; this can solve the IE framework by the English open problem
The following references Word-break's description, noting that Word-break is the ie5+ proprietary property
Syntax:
Word-break:normal | break-all | keep-all
Parameters:
Normal: According to Asian State and non-Asian text rules that allow wrapping within a word
Break-all: This behavior is the same as the normal for Asian languages. Also allows any word in a non-Asian text line to be disconnected. This value is appropriate for Asian text
Keep-all that contains some non-Asian text: the same as for all non-Asian languages. For Chinese, Korean, Japanese, word is not allowed to break. Suitable for non-Asian text with small amounts of Asian text
Description:
Sets or retrieves the word wrapping behavior within the text within an object. Especially when it comes to multiple languages.
for Chinese, you should use Break-all. The
Corresponding script attribute is wordbreak. Please refer to other bibliographies I have written.
Example:
div {word-break:break-all;}

Related Article

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.