Problem Description:
When I was writing a Web table, the table width exceeded the width I expected, and I wanted to set it a little bit smaller, but it never worked. Change to doubt life! The code is as follows:
After several debugs, the table can change size, but there will be a minimum value, which will be invalid when the value is lower than the minimum value, and the table size is always the minimum value. After brainwave, the problem is locked on the Input tab. Thinking that the table size has a minimum is because there is something to make it big, so can not be smaller. After the thought, the code changes as follows, the effect let me very satisfied.
In summary, the problem arises because the input tag has a default width and height, and when you set the width of the table to a different size, you can make it larger than it is, but not smaller than it. It is also necessary to consider the size position of the inner label when making the layout of the table style.
At the same time, after encountering a bug to remind yourself, encounter problems always own code has a problem, according to logic to try to modify, to understand deeply, to think about something inside, do not let go of any possible.
Invalid HTML table width setting