Home » CSS Tutorial » CSS Properties » width
width
CSS Property Info :
| Syntax: |
width: <value> |
| Possible Values: |
<length> | <percentage> | auto
|
| Initial Value: |
auto |
| Applies to: |
Block-level and replaced elements |
| Inherited: |
No |
CSS Browser Support :
Internet Explorer 4+
Netscape 4+
Opera 3.6+
W3C's CSS Level 1+
CSS Profile 1.0
Web TV
CSS Property Description :
Each block-level or replaced element can be given a width, specified as a length, a percentage, or as auto. (A replaced element is one for which only the intrinsic dimensions are known; HTML replaced elements include IMG, INPUT, TEXTAREA, SELECT, and OBJECT.) The initial value for the width property is auto, which results in the element's intrinsic width (i.e., the width of the element itself, for example the width of an image). Percentages refer to the parent element's width. Negative values are not allowed.
This property could be used to give common widths to some INPUT elements, such as submit and reset buttons:
INPUT.button { width: 10em }
CSS Bugs / Problems :
none
Adapted by style-sheets.com, maker of Style Studio, powerful CSS Editor for Windows.
Copyright © John Pozadzides and Liam Quinn. All rights reserved.
Home » CSS Tutorial » CSS Properties » width
|