How to use css table-layout attribute

青灯夜游
Release: 2019-05-29 16:11:05
Original
2846 people have browsed it

css table-layout attribute is used to set the layout algorithm used when setting the table layout for the table. The fixed layout algorithm is faster but less flexible, while the automatic algorithm is slower but more reflective of traditional HTML tables. All browsers support the table-layout attribute.

How to use css table-layout attribute

How to use the css table-layout attribute?

table-layout attribute sets the table layout algorithm for the table.

Syntax:

table-layout:automatic|fixed|inherit;
Copy after login

Attribute value:

● Automatic: Default. Column width is set by cell content.

● Fixed: The column width is set by the table width and column width.

● Inherit: Specifies that the value of the table-layout attribute should be inherited from the parent element.

Description:This attribute specifies the layout algorithm used to complete table layout. The fixed layout algorithm is faster but less flexible, while the automatic algorithm is slower but more reflective of traditional HTML tables.

Note:All browsers support the table-layout attribute. The attribute value "inherit" is not supported in any version of Internet Explorer (including IE8).

css table-layout attribute example

    
1000000000000000000000000000 10000000 100

1000000000000000000000000000 10000000 100
Copy after login

Rendering:

How to use css table-layout attribute

The above is the detailed content of How to use css table-layout attribute. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!