How to resolve a div in English that can't be wrapped automatically

Source: Internet
Author: User
In a div with a set width, when the length of Chinese text entered exceeds the set width, it will be automatically changed to the next line. However, if the input is the English letter, then, regardless of your div set width, the English letter is not wrapped directly in the same line output, resulting in the width of the div far beyond the set size.

Reason: This is because in Div, there is no space between the English letter, it will default to think that this is an English word, so the word output does not break line. So, do we have to add a space between each letter to solve the problem? In fact, can be implemented through CSS.

Workaround: Set Word-break:break-all in the style of the Div, and then wrap the line.

How to resolve a div in English that can't be wrapped automatically

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.