Home > Web Front-end > HTML Tutorial > How to adjust the td width in table_html/css_WEB-ITnose

How to adjust the td width in table_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:58:13
Original
1262 people have browsed it


Why is the width I set different from the actual width?
Some are longer and some are shorter? ? ?


Reply to discussion (solution)

The table is a whole, and the width of each column td is determined by the width of the longest td.
As for why it is different, I don’t know how your code is written. .

Use css or rowspan, colspan

The outside is a percentage, and the inside is also a percentage.
For example:



This way.
Then write a few fields with clear width expectations, and the other fields can be wider to let them adapt.

There are hidden dangers in setting the width by default




It might be better to add this

Related labels:
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template