The cover of The Complete Idiot's Guide to Create a Web Page The Complete Idiot's Style Sheets Reference

| Index | Current Category: Dimensions |
| Previous Style: widows | Next Style: word-break |


width

Specifies the width of a block element.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 4.0 and later 4.0 and later

See Also:

clip, height, line-height, max-width, min-width, overflow

Possible Values:

auto
The default width according to the normal HTML layout.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 4.0 and later 4.0 and later

length
An absolute width.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 4.0 and later 4.0 and later

percentage
The width as a percentage of the current block size.

Support:

W3C StandardInternet ExplorerNetscape Navigator
CSS1 and later 4.0 and later 4.0 and later

Example:
<P>This is a regular paragraph.
<P STYLE="width: 100px; border: thin solid">This is a paragraph that's 100 pixels wide.
How It Looks:

This is a regular paragraph.

This is a paragraph that's 100 pixels wide.


| Index | Current Category: Dimensions |
| Previous Style: widows | Next Style: word-break |