[ Specifying property values ] [ Text Properties ] [ Box Properties ] [ Background Properties ] [ Classification Properties ] [ Positioning ] [ New elements in CSS2] - including: New selectors, properties, font descriptors, pseudo-selectors, functions, added values for CSS1 Properties.
Adapted from Web Design in a Nutshell by Niederst
Specifying Values
Many CSS properties take numerical values for length, width, height and other measurements. Some values can be specified as percentage % values and these are indicated in the Glossary examples. Absolute values can be specified using these codes:
e.g.
style="line-height:3ex;"
style="border-top:2px;"
| Code | Unit | Description |
|---|---|---|
| px | Pixel | Taken relative to monitor resolution |
| pt | Point | Traditional publishing font measurement |
| 72 Points is approximately 1 inch (2.5cm). | ||
| pc | Pica | Traditional publishing font measurement |
| 12 Pica = 1 Point, approximately 1 / 6 inch (8mm). | ||
| em | Em | Taken relative to the capital M in the current font |
| Can be assumed to be equal to the current point size. | ||
| ex | Ex | Taken relative to the lower-case x in the current font |
| Can be assumed to equal half the current point size. | ||
| in | " | Inches |
| mm | mm | Millimetres |
| cm | cm | Centimetres |
Details about how to use these CSS properties can be found in the CodeHelp Glossary and each property listed is linked to the corresponding description.
- style="font-family: helvetica,sans-serif" - style="font-style:oblique;" - style="font-variant:small-caps;" - style="font-weight:700;" - style="font-size:xx-large;" - style="font: 12pt Times, serif;" - style="color:red;" - style="line-height:2em;" - style="word-spacing:2ex;" - style="letter-spacing:4pc;" - style="text-decoration:overline;" - style="text-transform:capitalize;" - style="text-align:justify;" - style="text-indent:2em;" - style="vertical-align:text-bottom;" - style="margin-right:20px;" - style="padding-right:20px;" - style="border-right-width:8px;" - style="border-color:red;" - style="border-style:groove;" - style="width:40px" - style="height:40px" - style="float:right" - style="clear:both" - style="background-color:silver;" - style="background-image:url(../images/nav2.jpg);" - style="background-repeat:repeat-y;" - style="background-attachment:fixed;" - style="background-position:top left;" - style="background: silver url(../images/nav2.jpg) repeat-y fixed top left;" - style="display:inline;" - style="white-space:pre;" - style="list-style-type:disc;" - style="list-style-image:url(../images/spot.png);" - style="list-style-position:inside;" - style="list-style: disc url() inside;"* {font-family:sans-serif;}DIV.body>P {text-align:justify;}P+UL {width:100%;}LI[id] {text-transform:capitalize;}TD[colspan="2"] {font-weight:700;}A[title~="Licence"] {font-weight:700;}<a href="../code/gpl.html" title="General Public Licence">The GPL</a>
*[LANG=fr] {font-weight:400;}| text-shadow | top | table-layout | volume |
| font-size-adjust | right | cell-spacing | speak |
| font-stretch | bottom | empty-cells | pause-before |
| unicode-bidi | left | caption-side | pause-after |
| z-index | content | pause | |
| cursor | min-width | quotes | speak-header-cell |
| outline | max-width | counter-reset | cue-before |
| outline-color | min-height | counter-increment | cue-after |
| outline-style | max-height | marker-offset | cue |
| outline-width | overflow | row-span | play-during |
| border-top-color | clip | column-span | azimuth |
| border-right-color | visibility | border-collapse | elevation |
| border-bottom-color | page | border-spacing | speech-rate |
| border-left-color | page-break-before | position | voice-family |
| border-top-style | page-break-after | direction | pitch |
| border-right-style | page-break-inside | pitch-range | |
| border-bottom-style | orphans | stress | |
| border-left-style | widows | richness | |
| size | speak-punctuation | ||
| marks | speak-date | ||
| speak-numeral | |||
| speak-time |
This is part of www.codehelp.co.uk Copyright © 1998-2004 Neil Williams
See the file about.html for
copying conditions.