This time I will bring you how to solve the problem of invalid width setting of table cell td. What should be solved if the width setting of table cell td is invalid? .
When making table pages, sometimes the width set for td is invalid. The width of td is always stretched by the internal content. You can set
, but set the width directly. But it is invalid. Let's take a look at this example in detail:
1000800 1000000 1000000 1000000 10000300 1000000
1000000 | 1000000 | 1000000 |
1000000 | 10000300 | 1000000 |
We can add a div in td, and then set the width of the div, let’s try it:
Modify part of the code in class div1:
1000800
1000800
and then write in the style:
td div { width:100px; }
I believe you have mastered the method after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
htmlHow to control the properties of a hyperlink when opening a new window Progressive enhancement in css3 And how to use graceful degradation How should the new units vw, vh, vmin, vmax of css3 be usedThe above is the detailed content of How to solve the problem that the width setting of table cell td is invalid. For more information, please follow other related articles on the PHP Chinese website!