Search DaTutorials:  
HOME
CSS Tutorials
Articles
Basics
Backgrounds
Customizing
Formatting
General
Layouts
Link Effects
Navigation
Positioning
Rollovers
Text Effects
Search For a Tutorial
CSS Reference

Width


Syntax: width: <value>
Possible Values: <length> | <percentage> | auto
Initial Value: auto
Applies to: Block-level and replaced elements
Inherited: No

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 }

Copyright © 1998 Liam Quinn. All rights reserved.

     Savings Accounts | Charity | Car Insurance | Car Insurance | Online Loans
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp