So, maybe this is a typo but I came across some old code:
Was this a typo? or does this do something
-
"*" is MultiLength value defined in HTML. See: http://www.w3.org/TR/html4/types.html#h-6.6
讨论(0)
-
That's not "inline style", but legacy HTML that should be avoided in favor of CSS. But, to answer your question, it means, essentially, "fill". But, in practice it has no effect and can be safely removed.
http://jsfiddle.net/sn4qn/5/
Perhaps it's there as an indicator to future developers that the width was intended to be set automatically by the browser.
讨论(0)
-
This allows means "remaining space". You can use several in conjunction. e.g..
<td valign="top" width="*">...</td><td valign="top" width="2*">...</td>
Together, these two columns will use all the horizontal space available. The second will be twice as wide as the first.
Update:
To respond to the comment made below, I found the following on the W3 site:
Proportional specifications (e.g., width="3*") refer to portions of the horizontal space required by a table. If the table width is given a fixed value via the width attribute of the TABLE element, user agents may render the table incrementally even with proportional columns.
However, if the table does not have a fixed width, user agents must receive all table data before they can determine the horizontal space required by the table. Only then may this space be allotted to proportional columns.
Source: http://www.w3.org/TR/html4/struct/tables.html
讨论(0)
- 热议问题