Ask the perfect solution for table column width?

Source: Internet
Author: User
For example, in the development system, tables are often used for N-plus data lists, which are obsessive-compulsive aesthetics. to make every column width of each table relatively perfect, is there a dynamic and perfect solution. First, do not want to: th or td directly width & #039; 30px & #039; second, do not want to: style & quot; width: 30p...

For example, in the development system, tables are often used for N-plus data lists, which are obsessive-compulsive aesthetics. to make every column width of each table relatively perfect, is there a dynamic and perfect solution.

First, do not want to: th or td directly width = '30px'
Second, do not want to: style = "width: 30px"
Third, I don't want to: define a class similar to common column widths, such as table. id and table. handel.

The first type is the least desirable, and the second and third types cannot be dynamically set. there are still a lot of column widths that are not fixed.

Is there a way, for example, the id, name, and upper-level menu operations are the maximum width of the content, and then one of the columns is automatically filled up?

Reply content:

For example, in the development system, tables are often used for N-plus data lists, which are obsessive-compulsive aesthetics. to make every column width of each table relatively perfect, is there a dynamic and perfect solution.

First, do not want to: th or td directly width = '30px'
Second, do not want to: style = "width: 30px"
Third, I don't want to: define a class similar to common column widths, such as table. id and table. handel.

The first type is the least desirable, and the second and third types cannot be dynamically set. there are still a lot of column widths that are not fixed.

Is there a way, for example, the id, name, and upper-level menu operations are the maximum width of the content, and then one of the columns is automatically filled up?

Do you want your Paster style? make sure you don't want it. So where did your texture come from! You can refer to the dome you just found.

Generally, self-adaptation is good, but some fields may have less content and the self-adaptation is too long. you can only manually write the length. I don't think it's as good as above. The key is to calculate the length of a field. you can manually calculate the length of each table on your own. In addition, there is no way to idealize it. sometimes there are too many words and sometimes less words. In addition, the number of words in a row is large, and the number of words in a row is small.

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.