The function and use of css:table-layout attribute

Source: Internet
Author: User
I have seen a lot of the use of CSS, but for some of the properties are not called less than how to see, today in the classic to see the paste, found a "How to use CSS Force TD do not change the line?" Topic discussion, found table-layout this attribute of the use of detailed, first paste out the content:

Grammar:
Table-layout:auto | Fixed
Value:
Auto: Default value. The default automatic algorithm. The layout will be based on the contents of each cell. The table will not be displayed until all content in each cell has been read and evaluated.
Fixed: The algorithm for fixing the layout. In this algorithm, the width of the table and column depends on the sum of the width of the Col object, and if not specified, it depends on the width of each cell in the first row. If the table does not specify a width property, the table is presented with a default width of 100%.

Description
Sets or retrieves the layout algorithm for a table.
You can use this property to improve the performance of table submissions. This property causes IE to render the table contents one line at a time to provide faster speed to the information user. This property uses one of the following methods to lay out the table column width in this order:
Use the Width property information of a col or Colgroup object.
Use the width information of the cell in the first row of the table.
Divides the table width by the number of table columns. Regardless of the actual width of the table content.
If the contents of the cell exceed the column width, the content will be wrapped. If the line cannot be wrapped, the content will be cropped. If this property is set to fixed, then overflow can be used to control the processing of content that overflows the width of the cell (TD). If the table row height is specified, the contents of the newline will be cropped vertically if it exceeds the specified table row height.
Setting this property value to fixed will help improve table performance. The effect is particularly noticeable for long tables.
Setting the table row height can further improve the presentation speed, and the browser does not need to detect every cell in the row to determine that the row can begin parsing and presenting.
This property is read-only for Currentstyle objects. Readable and writable for other objects.

The corresponding script attribute is tablelayout.

Note the following:
1, you can improve table presentation performance with this property. This property causes IE to render the table contents one line at a time to provide faster speed to the information user.
2, setting this property value to fixed, helps improve table performance. The effect is particularly noticeable for long tables.
3, set the table row height can further improve the presentation speed, the browser does not need to detect every cell in the row to determine the row can start parsing and submission. The
----------------------------------------------------
feature is useful for long table display speeds and effects. Can be used to improve tabular performance!

for the author's question is also more interesting, the requirements are as follows:
1, in TD, do not appear nowrap attribute, to find a way to put nowrap in CSS.
2,TD, not allowed to have a folding line, more than the part to hide!
The final implementation method (note that the DTD cannot be added here, or it will not be implemented, I do not know why):

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.