HTML Table TR Auto Wrap, Width Adaptive: table-layout:fixed Property Narration __html

Source: Internet
Author: User

Explanation of the Table-layout:fixed property
If you want a table fixed size, the inside text is forced to wrap (especially in a long string of English text, and there is no space between the case), in order to make the long text does not break the purpose of the table, is generally the use of style: Table-layout:fixed. But under Firefox, there will be some problems: Firefox, content will float out of the box, temporarily did not find a solution, if there is a solution to this method of friends, welcome to the post, holds dutifully will be very grateful!

Example 1: (ie browser) long string English automatic return line
Methods: Adding Word-wrap:break-word at the same time;
Table{table-layout:fixed;word-wrap:break-word;}

Example 2: (ie browser) the contents of a table are hidden

methods: Use Styles table-layout:fixed and nowrap (one row column)



Example 3: (Ie\firefox browser) fixed width to hide superfluous content
Method: Use style table-layout:fixed and nowrap with percent fixed TD size, and use div (row two columns)


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.