Cascading Style Sheets (CSS)
|
With style sheets, you can use numeric values to set style properties in multiple ways:
Style sheet values may be given either in integers or in real numbers (digits with an integer part and a decimal part).
These values can, in some cases, be negative (preceded with a minus sign "-"). However, some properties have upper and lower limits to the values they can take.
The absolute units offered by the CSS standard are summarised in this chart:
| unit | description | |
|---|---|---|
| cm | centimetres | |
| in | inches (1 inch = 2.54 cm) | |
| mm | millimetres | |
| pt | points | |
| pc | picas (1 pica = 12 pt) |
| unit | description |
|---|---|
| em | Relative to the font size of the indicated element. Sole exception to this rule: when the property font-size is defined, it is relative to the font size of the parent element. |
| ex | Relative to the lowercase letter height of the indicated element. Sole exception to this rule: when the property font-size is defined, it is relative to the lowercase letter height of the parent element. |
| px | The pixel. This is a unit which may be rendered differently depending on the screen resolution of the user's monitor. |
| % | The percentage is a unit which is relative to the size of the element or its parent. |
| 09/04 17h26 | Cleanup Unused CSS Tags? | 2 |