Name
width — IE4 P/Y | IE5 P/Y | NN4 P/P | Op3 Q/-
Synopsis
Used to set the width of an element. This is most often applied to images, but can be used on any block-level or replaced element. Negative values are not permitted.
Example
TABLE {width: 80%;}
Values
<length> | <percentage> | auto
Default
auto
Inherited
no
Applies to
block-level and replaced
Percentage values refer to the parent element’s width.
Get Cascading Style Sheets: The Definitive Guide 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.