Size Controls
Each object on your web page has a size. The size is either determined by the content of the object or can be defined using these stylesheet attributes:
- width specifies the width of the object. This can be auto (the default), a length, or a percentage.
- height specifies the height of the object. This can be auto (the default), a length, or a percentage. The height attribute may be ignored if the content of the object dictate that the object needs to be shorter or taller than specified (unless an overflow attribute is also specified).
- min-width and max-width specify the minimum and maximum widths that the object may have.
- min-height and max-height specify the minimum and maximum heights that the object may have.
Length can be specified in a number of different ways:
- em width of letter M in current font
- ex width of letter x in current font
- cm centimetres
- mm millimetres
- pc picas
- pt points
- in inches
- px pixels
Examples
div{width:200px;}
.mix {width:10%;min-width:50px;}


