[Original] explore CSS line feed

Source: Internet
Author: User

In a recent project, this project requires a lot of data output, and various types of data need to be generated in the table. This is a headache: long English string line breaks. After finding a lot of information, I finally used a property value for word-wrap and table-layout. Based on the actual situation of the project, I made some compatibility measures to solve the problem, I also shared it with my team, hoping to help you and improve your understanding of CSS long English or long field line breaks.

The line feed of long English or long fields is summarized as follows:

Three attributes to be understood

1. Word-wrap: the break-word line feed only supports consecutive English letters and numbers and is invalid in the table.

2. Word-break: The line feed in the break-all boundary supports short words including English letters and numbers, and is invalid in Firefox.

3. Table-layout: Fixed fixed table to start this attribute. The table supports word-wrap: Break-word; overflow: hidden.

How to Use DIV in a common container

Word-wrap: Break-word;

Suggestions on table usage in the container (Div)

Table-layout: fixed; Word-wrap: Break-word;

For details, see the PPT:

View More highlights

Download Attachment

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.