Name

WIDTH — NN n/a IE 4 HTML 4

Synopsis

WIDTH=”multiLength"

Optional

Defines the maximum width for the column(s) covered by the COL element. In practice (in IE 4 Windows, anyway), the browser won’t render a column narrower than the widest contiguous stretch of characters not containing whitespace (e.g., the longest word). The precise measure of such a column width, of course, depends on the font characteristics of the content, as well. Internet Explorer 4 for the Mac mixes up column width assignments when the COL element is deployed.

Example

<COL WIDTH=100>

Value

Internet Explorer 4 accepts length values for the WIDTH in the form of pixel measures (without the “px” unit) or percentage of available horizontal space allocated to the entire table (WIDTH="25%").

The HTML 4.0 specification introduces an additional length measurement scheme to supplement the regular length measure. Called a proportional length (also MultiLength), this format features a special notation and geometry. It is best suited for situations in which a COL element is to be sized based on the available width of the table space after all fixed length and percentage lengths are calculated. Using the proportional length notation (a number followed by an asterisk), you can direct the browser to divide any remaining space according to proportion. For example, if there is enough horizontal space on the page for 100 pixels after all other column width calculations are performed, three COL elements might specify WIDTH attributes ...

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.