|
CSS Frequently Asked Questionshttp://www.hwg.org/resources/faqs/2cssFAQ.html Table of Contents[General Questions] [Specific Questions] [CSS Support] [More Information] CSS Support
List of properties and values supported by CSS1at rule - @import (applies to style sheet) |
Font Properties
| Property | Values | Applies to | Inh. |
|---|---|---|---|
| font-family | [ [ <family-name> | <generic-family> ], ]* [ <family-name> | <generic-family> ] | all elements | yes |
| font-style | normal | italic | oblique | all elements | yes |
| font-variant | normal | small-caps | all elements | yes |
| font-weight | normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | all elements | yes |
| font-size | [ xx-large | x-large | large | medium | small | x-small | xx-small ] | [ larger | smaller ] | <percentage> | <length> | all elements | yes |
| font | [ font-style || font-variant || font-weight ] ? font-size [ / line-height ] ? font-family | all elements | yes |
<color> and Background Properties
| Property | Values | Applies to | Inherited? |
|---|---|---|---|
| color | <color> | all elements | yes |
| background-color | <color> | transparent | all elements | no |
| background-image | url | none | all elements | no |
| background-repeat | repeat | repeat-x | repeat-y | no-repeat | all elements | no |
| background-attachment | scroll | fixed | all elements | no |
| background-position | [ <percentage> | <length> ] | {1,2} | [ top | center | bottom ] || [ left | center | right ] | block-level and replaced elements | no |
| background | background-color | background-image ||background-repeat || background-attachment || background-position | all elements | no |
Text Properties
| Property | Values | Applies to | Inh. |
|---|---|---|---|
| word-spacing | normal | <length> | all elements | yes |
| letter-spacing | normal | <length> | all elements | yes |
| text-decoration | none | underline | overline | line-through | blink | all elements | no |
| vertical-align | baseline | sub | super | top | text-top | middle | bottom | <percentage> | inline elements | no |
| text-transform | capitalize | uppercase | lowercase | none | all elements | yes |
| text-align | left | right | center | justify | block-level elements | yes |
| text-indent | <length> | <percentage> | all elements | yes |
| line-height | normal | <number> | <length> | <percentage> | all elements | yes |
Box Properties
| Property | Values | Applies to | Inh. |
|---|---|---|---|
| margin-top | <length> | <percentage> | auto | all elements | no |
| margin-right | <length> | <percentage> | auto | all elements | no |
| margin-bottom | <length> | <percentage> | auto | all elements | no |
| margin-left | <length> | <percentage> | auto | all elements | no |
| margin | <length> | <percentage> | auto {1,4} | all elements | no |
| padding-top | <length> | <percentage> | all elements | no |
| padding-right | <length> | <percentage> | all elements | no |
| padding-bottom | <length> | <percentage> | all elements | no |
| padding-left | <length> | <percentage> | all elements | no |
| padding | <length> | <percentage> {1,4} | all elements | no |
| border-top-width | thin | medium | thick | <length> | all elements | no |
| border-right-width | thin | medium | thick | <length> | all elements | no |
| border-bottom-width | thin | medium | thick | <length> | all elements | no |
| border-left-width | thin | medium | thick | <length> | all elements | no |
| border-width | thin | medium | thick | <length> {1,4} | all elements | no |
| border-color | <color> {1,4} | all elements | no |
| border-style | none | dotted | dashed |solid | double | groove | ridge | inset | outset | all elements | no |
| border-top | border-top-width | border-style | <color> | all elements | no |
| border-right | border-right-width | border-style | <color> | all elements | no |
| border-bottom | border-bottom-width | border-style | <color> | all elements | no |
| border-left | border-bottom-width | border-style | <color> | all elements | no |
| border | border-width | border-style | <color> | all elements | no |
| width | <length> | <percentage> | auto | block-level and replaced elements | no |
| height | <length> | auto | block-level and replaced elements | no |
| float | none | left | right | all elements | no |
| clear | none | left | right | both | all elements | no |
Classification Properties
| Property | Values | Applies to | Inh. |
|---|---|---|---|
| display | none | block | inline | list-item | all elements | no |
| white-space | normal | pre | nowrap | block-level elements | no |
| list-style-type | disk | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none | elements with 'display' value 'list-item' | yes |
| list-style-image | url | none | elements with 'display' value 'list-item' | yes |
| list-style-position | inside | outside | elements with 'display' value 'list-item' | yes |
| list-style | keyword || position || url | elements with 'display' value 'list-item' | yes |
at rule - @font-face, @page, @media (apply to style sheet)
Pseudo-classes - :left, :right, (apply to @page)
Pseudo-element -:marker (applies for markers used in lists)
Font Properties
| @font-face | font-family: name; src:url(url) | all elements | yes |
| Descriptor | Values | Applies to | Inh. |
|---|---|---|---|
| font-family | <family-name> | <generic-family>] [, [<family-name> | <generic-family>]]* | Web fonts | yes |
| font-style | [ normal | italic | oblique ] [, [normal | italic | oblique] ]* | Web fonts | yes |
| font-variant | [normal | small-caps] [,[normal | small-caps]]* | Web fonts | yes |
| font-weight | all | [normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800] [, [normal | bold | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800]]* | Web fonts | yes |
| font-size | all | [<length> [,[<length>]]* ] | Web fonts | yes |
| unicode-range | [<urange>]+ | Web fonts | yes |
| units-per-em | <number> | Web fonts | yes |
| src | [ URL [format [,format]*]? | font face name ] [, URL [format [,format]*]?] | font face name]* | Web fonts | yes |
| panose-1 | [ <number> ] {10} | Web fonts | yes |
| stemv | <number> | Web fonts | yes |
| stemh | <number> | Web fonts | yes |
| slope | <number> | Web fonts | yes |
| cap-height | <number> | Web fonts | yes |
| x-height | <number> | Web fonts | yes |
| ascent | <number> | Web fonts | yes |
| descent | <number> | Web fonts | yes |
| widths | [<urange>]? [<number>]+ [,[<urange>]? [<number>]+] | Web fonts | yes |
| definition-src | URL | Web fonts | yes |
| centerline | <number> | Web fonts | yes |
| mathline | <number> | Web fonts | yes |
| topline | <number> | Web fonts | yes |
Positioning Properties
| Property | Values | Applies to | Inh. |
|---|---|---|---|
| position | absolute | relative | static | all elements | no |
| left | <length> | <percentage> | auto | absolutely and relatively positioned elements | no |
| top | <length> | <percentage> | auto | absolutely and relatively positioned elements | no |
| height | <length> | <percentage> | auto | block-level and replaced elements, elements with 'position' property value of 'absolute' | no |
| width | <length> | <percentage> | auto | block-level and replaced elements, elements with 'position' property value of 'absolute' | no |
| clip | shape | auto | all elements | no |
| overflow | visible | hidden | scroll | auto | all elements | no |
| z-index | auto | integer | positionable elements | no |
| visibility | visible | hidden | inherit | all elements | if value is 'inherit' |
Printing Properties
| Property | Values | Applies to | Inh. |
|---|---|---|---|
| page-break-before | auto | always | left | right | block-level elements outside of tables | no |
| page-break-after | auto | always | left | right | block-level elements outside of tables | no |
| size | <length> {1,2} | auto | portrait | landscape | @page | N/A |
| marks | crop || cross | none | @page | N/A |
Aural Properties
| volume | <percentage> | silent | x-soft | soft | medium | loud | x-loud | all elements | yes |
| pause-before | time | <percentage> | all elements | no |
| pause-after | time | <percentage> | all elements | no |
| pause | [time | <percentage>]{1,2}; | all elements | no |
| cue, cue-before, cue-after | url | none | all elements | no |
| play-during | url mix? repeat? | auto | none | all elements | no |
| azimuth | angle| [[left-side | far-left | left | center-left | center | center-right | right | far-right | right-side] || behind ] | leftwards | rightwards | all elements | yes |
| elevation | angle | below | level | above | higher | lower | all elements | yes |
| speech-rate | <number> | x-slow | slow | medium | fast | x-fast | faster | slower | all elements | yes |
| voice-family | : [[<specific-voice> | <generic-voice>],]* [<specific-voice> | <generic-voice>] | all elements | yes |
| pitch | <hertz> | x-low | low | medium | high | x-high | all elements | yes |
| pitch-range | <percentage> | all elements | yes |
| stress | <percentage> | all elements | yes |
| richness (brightness?) | <percentage> | all elements | yes |
| speak-punctuation | code | none | all elements | yes |
| speak-date | myd | dmy | ymd | all elements | yes |
| speak-numeral | digits | continous | none | all elements | yes |
| speak-time | 24 | 12 | none | all elements | yes |
Other Properties
| Property | Values | Applies to | Inh. |
|---|---|---|---|
| magnification | <percentage> | all elements | yes |
| break | block-before | block-after | line-before | line-after | auto | all elements | no |
| vertical-align | <length> | inline elements | no |
| text-shadow-color | none | <color> | text | no |
| offset | <length> {1,2} | shadowed text | no |
| cursor | auto | crosshair | default | hand | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help | all elements | yes |
| columns | [ <length> | <number> ] [ <length> | <percentage> ]? | block-level elements | no |
| column-rule | width height ? || style || url || <color> | block-level elements | no [[yes?]] |
Font Properties
| Property | Values supported by IE 4.0 | Applies to |
|---|---|---|
| font-family | [ [ <family-name> | <generic-family> ], ]* [ <family-name> | <generic-family> ] | all elements |
| font-style | normal | italic | all elements |
| font-variant | normal | small-caps | all elements |
| font-weight | normal | bold | all elements |
| font-size | [ xx-large | x-large | large | medium | small | x-small | xx-small ] | [ larger | smaller ] | <percentage> | <length> | all elements |
| font | [ font-style || font-variant || font-weight ] ? font-size [ / line-height ] ? font-family | all elements |
| @font-face | font-family: font-family; src:url(url) | all elements |
Color and Background Properties
| Property | Values supported by IE 4.0 | Applies to |
|---|---|---|
| color | <color> | all elements |
| background-color | <color> | transparent | all elements |
| background-image | url | none | all elements |
| background-repeat | repeat | repeat-x | repeat-y | no-repeat | all elements |
| background-attachment | scroll | fixed | all elements |
| background-position | [ position | <length> ] | {1,2} | [ top | center | bottom ] || [ left | center | right ] | block-level and replaced elements |
| background | transparent | <color> || url || repeat || scroll || position | all elements |
Text Properties
| Property | Values supported by IE 4.0 | Applies to |
|---|---|---|
| letter-spacing | normal | <length> | all elements |
| text-decoration | none | underline | overline | line-through | all elements |
| vertical-align | sub | super | | inline elements |
| text-transform | capitalize | uppercase | lowercase | none | all elements |
| text-align | left | right | center | justify | block-level elements |
| text-indent | <length> | <percentage> | all elements |
| line-height | normal | <number> | <length> | <percentage> | all elements |
Box Properties
| Property | Values supported by IE 4.0 | Applies to |
|---|---|---|
| margin-top | <length> | <percentage> | auto | block-level and replaced elements |
| margin-right | <length> | <percentage> | auto | block-level and replaced elements |
| margin-bottom | <length> | <percentage> | auto | block-level and replaced elements |
| margin-left | <length> | <percentage> | auto | block-level and replaced elements |
| margin | <length> | <percentage> | auto {1,4} | block-level and replaced elements |
| padding-top | <length> | <percentage> | block-level and replaced elements |
| padding-right | <length> | <percentage> | block-level and replaced elements |
| padding-bottom | <length> | <percentage> | block-level and replaced elements |
| padding-left | <length> | <percentage> | block-level and replaced elements |
| padding | <length> | <percentage> {1,4} | block-level and replaced elements |
| border-top-width | thin | medium | thick | <length> | block-level and replaced elements |
| border-right-width | thin | medium | thick | <length> | block-level and replaced elements |
| border-bottom-width | thin | medium | thick | <length> | block-level and replaced elements |
| border-left-width | thin | medium | thick | <length> | block-level and replaced elements |
| border-width | thin | medium | thick | <length> {1,4} | block-level and replaced elements |
| border-top-color | <color> | block-level and replaced elements |
| border-right-color | <color> | block-level and replaced elements |
| border-bottom-color | <color> | block-level and replaced elements |
| border-left-color | <color> | block-level and replaced elements |
| border-color | <color> {1,4} | block-level and replaced elements |
| border-top-style | none | solid | double | groove | ridge | inset | outset | block-level and replaced elements |
| border-right-style | none | solid | double | groove | ridge | inset | outset | block-level and replaced elements |
| border-bottom-style | none | solid | double | groove | ridge | inset | outset | block-level and replaced elements |
| border-left-style | none | solid | double | groove | ridge | inset | outset | block-level and replaced elements |
| border-style | none | solid | double | groove | ridge | inset | outset | block-level and replaced elements |
| border-top | border-width | border-style | border-color | block-level and replaced elements |
| border-right | border-width | border-style | border-color | block-level and replaced elements |
| border-bottom | border-width | border-style | border-color | block-level and replaced elements |
| border-left | border-width | border-style | border-color | block-level and replaced elements |
| border | border-width | border-style | border-color | block-level and replaced elements |
| float | none | left | right | DIV, SPAN, and replaced elements |
| clear | none | left | right | both | all elements |
Classification Properties
| Property | Values supported by IE 4.0 | Applies to |
|---|---|---|
| display | none | block | inline | list-item | TABLE, INPUT, TEXTAREA, INPUT type=button, DIV, SPAN, IFRAME, IMG, BODY, MARQUEE, SELECT |
| list-style-type | disk | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none | list-item elements |
| list-style-image | url | none | list-item elements |
| list-style-position | inside | outside | list-item elements |
| list-style | keyword || position || url | list-item elements |
Positioning Properties
| Property | Values supported by IE 4.0 | Applies to |
|---|---|---|
| clip | shape | auto | all elements |
| height | <length> | auto | DIV, SPAN and replaced elements |
| left | <length> | <percentage> | auto | absolutely and relatively positioned elements |
| overflow | visible | hidden | scroll | auto | all elements |
| position | absolute| relative | static | all elements |
| top | <length> | <percentage> | auto | absolutely and relatively positioned elements |
| visibility | visible | hidden | inherit | all elements |
| width | <length> | <percentage> | auto | DIV, SPAN and replaced elements |
| z-index | auto | integer | absolutely and relatively positioned elements |
Printing Properties
| Property | Values supported by IE 4.0 | Applies to |
|---|---|---|
| page-break-before | auto | always |left | right | block-level elements |
| page-break-after | auto | always | left | right | block-level elements |
Filter Properties
| Property | Values supported by IE 4.0 | Applies to |
|---|---|---|
| Visual Filter | filtername(fparameter1,fparameter2) | all elements |
| Reveal Transition Filter | RevealTrans(duration=duration, transition=transitionshape) | all elements |
| Blend Transition Filter | BlendTrans(duration=duration) | all elements |
Pseudo Classes and Other Properties
| Property | Values supported by IE 4.0 | Applies to |
|---|---|---|
| @import | url(url) | style sheets |
| cursor | auto | crosshair | default | hand | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | all elements |
| !important | !important | style sheets |
| active, hover, link, visited | n/a | all elements |
Font Properties
| Property | Values |
|---|---|
| font-size | points (pt), inches (in), centimeters (cm), pixels (px), percentage (%) |
| font-family | typeface name, font family name |
| font-weight | extra-light, light, demi-light, medium, demi-bold, bold, extra-bold |
| font-style | normal, italic |
| line-height | points (pt), inches (in), centimeters (cm), pixels (px), percentage (%) |
| color | color-name, RGB triplet |
| text-decoration | none, underline, italic, line-through |
| margin-left | points (pt), inches (in), centimeters (cm), pixels (px), incl. negative margins |
| margin-right | points (pt), inches (in), centimeters (cm), pixels (px), incl. negative margins |
| margin-top | points (pt), inches (in), centimeters (cm), pixels (px), incl. negative margins |
| text-align | left, center, right |
| text-indent | points (pt), inches (in), centimeters (cm), pixels (px), incl. negative indent |
| background | color-name,RGB triplet (NOTE: background in BODY in external style sheets is not supported |
| @import | url(url) |
| :link, :active, :visited | n/a |