CSS Properties

The following table shows the most common Cascading Style Sheet elements. Internet Explorer specific functions have been excluded. More information available soon.

         
FONT
PROPERTY VALUES APPLIES TO INHERITED %VALUES
font-family [[<family-name> | <generic-family>],]* [<family-name> | <generic-family>]

default: UA-specific

all elements yes n/a
font-style normal | italic | oblique all elements yes n/a
font-variant normal | small-caps all elements yes n/a
font-weight normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 all elements yes n/a
font-size <absolute-size> | <relative-size> | <length> | <percentage>

default: medium

all elements yes relative to parent element's font size
font
(shorthand property)
[<font-style> || <font-variant> || <font-weight>]? <font-size> [/<line-height>]? <font-family>

default: not defined

all elements yes allowed on <font-size> and <line-height>
 
COLOR AND BACKGROUND
color <color>

default: UA-specific

all elements yes n/a
background-color transparent | <color> all elements no n/a
background-image none | <url> all elements no n/a
background-repeat repeat | repeat-x | repeat-y | no-repeat all elements no n/a
background-attachment scroll | fixed all elements no n/a
background-position [<percentage> | <length>]{1,2} | [top | center | bottom] || [left | center | right]

default: 0% 0%

block-level and replaced elements no refer to the size of the element itself
background
(shorthand property)
<background-color> || <background-image> || <background-repeat> || <background-attachment> || <background-position>

default: not defined

all elements no allowed on <background-
position>
 
TEXT
word-spacing normal | <length> all elements yes n/a
letter-spacing normal | <length> all elements yes n/a
text-decoration none | [underline || overline || line-through || blink]

default: none

all elements no n/a
vertical-align baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> inline elements no refer to the 'line-height' of the element itself
text-transform none | capitalize | uppercase | lowercase all elements yes n/a
text-align left | right | center | justify

default: UA-specific

block-level elements yes n/a
text-indent <length> | <percentage>

default: 0

block-level elements yes refer to parent element's width
line-height normal | <number> | <length> | <percentage> all elements yes relative to the font size of the element itself
 
BOX
margin-top <length> | <percentage> | auto

default: 0

all elements no refer to parent element's width
margin-right <length> | <percentage> | auto

default: 0

all elements no refer to parent element's width
margin-bottom <length> | <percentage> | auto

default: 0

all elements no refer to parent element's width
margin-left <length> | <percentage> | auto

default: 0

all elements no refer to parent element's width
margin
(shorthand property)
[<length> | <percentage> | auto]{1,4}

default: not defined

all elements no refer to parent element's width
padding-top <length> | <percentage>

default: 0

all elements no refer to parent element's width
padding-right <length> | <percentage>

default: 0

all elements no refer to parent element's width
padding-bottom <length> | <percentage>

default: 0

all elements no refer to parent element's width
padding-left <length> | <percentage>

default: 0

all elements no refer to parent element's width
padding [<length> | <percentage>]{1,4}

default: 0

all elements no refer to parent element's width
border-top-width medium | thin | thick | <length> all elements no n/a
border-right-width medium | thin | thick | <length> all elements no n/a
border-bottom-width medium | thin | thick | <length> all elements no n/a
border-left-width medium | thin | thick | <length> all elements no n/a
border-width
(shorthand property)
[thin | medium | thick | <length>]{1,4}

default: not defined

all elements no n/a
border-color <color>{1,4}

default: the value of the 'color' property

all elements no n/a
border-style none | dotted | dashed | solid | double | groove | ridge | inset | outset all elements no n/a
border-top
(shorthand property)
<border-top-width> || <border-style> || <color>

default: not defined

all elements no n/a
border-right
(shorthand property)
<border-right-width> || <border-style> || <color>

default: not defined

all elements no n/a
border-bottom
(shorthand property)
<border-bottom-width> || <border-style> || <color>

default: not defined

all elements no n/a
border-left
(shorthand property)
<border-left-width> || <border-style> || <color>

default: not defined

all elements no n/a
border
(shorthand property)
<border-width> || <border-style> || <color>

default: not defined

all elements no n/a
width auto | <length> | <percentage> block-level and replaced elements no refer to parent element's width
height auto | <length> block-level and replaced elements no n/a
float none | left | right all elements no n/a
clear none | left | right | both all elements no n/a
 
CLASSIFICATON
display block | inline | list-item | none all elements no n/a
white-space normal | pre | nowrap block-level elements yes n/a
list-style-type disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none elements with 'display' value 'list-item' yes n/a
list-style-image none | <url> elements with 'display' value 'list-item' yes n/a
list-style-position outside | inside elements with 'display' value 'list-item' yes n/a
list-style
(shorthand property)
<keyword> || <position> || <url>

default: not defined

elements with 'display' value 'list-item' yes n/a
 
POSITIONING
position static | absolute | relative all elements no n/a
left auto | <length> | <percentage> elements with the 'position' property of type 'absolute' or 'relative' no refer to parent element's width and height. If parent's height is set to 'auto', percentage is undefined.
top auto | <length> | <percentage> elements with the 'position' property of type 'absolute' or 'relative' no refer to parent element's width and height. If parent's height is set to 'auto', percentage is undefined.
z-index auto | <integer> positional elements no n/a
width auto | <length> | <percentage> block-level and replaced elements, elements with 'position' property value of 'absolute' no refer to parent element's width and height. If parent's height is 'auto', percentage of height is undefined
height auto | <length> | <percentage> block-level and replaced elements, elements with 'position' property value of 'absolute' no refer to parent element's width and height. If parent's height is 'auto', percentage of height is undefined
clip auto | <shape> elements with the 'position' property of type 'absolute' no n/a
overflow visible | hidden | scroll | auto elements with the 'position' property of type 'absolute' no n/a
visibility inherit | visible | hidden all elements if value is 'inherit' n/a