CSS Guide
Fonts  |  Colors & Backgrounds  |  Text  |  Boxes  |  Classification  |  Positioning
Copyright © 1998-2003 by Radok Corporation  
Return to
Radok's Home Page
    Font Properties
  Property  Value  Applies To  Inherited  % Values
font-family
more info
[<family-name> | <generic-family>],]* [<family-name> | <generic-family>]
default: UA-specific
all elements yes n/a
font-style
more info
normal | italic | oblique all elements yes n/a
font-variant
more info
normal | small-caps all elements yes n/a
font-weight
more info
normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 all elements yes n/a
font-size
more info
<absolute-size> | <relative-size> | <length> | <percentage>
default: medium
all elements yes relative to parent element's font size
font
more info
[<font-style> || <font-variant> || <font-weight>]? <font-size> [/<line-height>]? <font-family>
default: not defined
all elements yesallowed on <font-size> and <line-height>
Copyright © 1998-2003 by Radok Corporation

    Colors & Backgrounds
  Property  Value  Applies To  Inherited  % Values
color
more info
<color>
default:UA-specific
all elements yes n/a
background-color
more info
transparent | <color> all elements no n/a
background-image
more info
none | <url> all elements no n/a
background-repeat
more info
repeat | repeat-x | repeat-y | no-repeat all elements no n/a
background-attachment
more info
scroll | fixed all elements no n/a
background-position
more info
[<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
more info
<background-color> || <background-image> || <background-repeat> || <background-attachment> || <background-position>
default: not defined
all elements no allowed on <background-
position>
Copyright © 1998-2003 by Radok Corporation

    Text Properties
  Property  Value  Applies To  Inherited  % Values
word-spacing
more info
normal | <length> all elements yes n/a
letter-spacing
more info
normal | <length> all elements yes n/a
text-decoration
more info
none | [underline || overline || line-through || blink]
default: none
all elements no n/a
vertical-align
more info
baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> inline elements no
text-transform
more info
none | capitalize | uppercase | lowercase all elements yes n/a
text-align
more info
left | right | center | justify
default: UA-specific
block-level elements yes n/a
text-indent
more info
<length> | <percentage>
default: 0
block-level elements yes refer to parent element's width
line-height
more info
normal | <number> | <length> | <percentage> all elements yes relative to the font size of the element itself
Copyright © 1998-2003 by Radok Corporation

    Box Properties
  Property  Value  Applies To  Inherited  % Values
margin-top
more info
<length> | <percentage> | auto
default: 0
all elements no refer to parent element's width
margin-right
more info
<length> | <percentage> | auto
default: 0
all elements no refer to parent element's width
margin-bottom
more info
<length> | <percentage> | auto
default: 0
no refer to parent element's width
margin-left
more info
<length> | <percentage> | auto
default: 0
all elements no refer to parent element's width
margin
more info
[<length> | <percentage> | auto]{1,4}
default: not defined
all elements no refer to parent element's width
padding-top
more info
<length> | <percentage>
default: 0
all elements no refer to parent element's width
padding-right
more info
<length> | <percentage>
default: 0
all elements no refer to parent element's width
padding-bottom
more info
<length> | <percentage>
default: 0
all elements no refer to parent element's width
padding-left
more info
<length> | <percentage>
default: 0
all elements no refer to parent element's width
padding
more info
[<length> | <percentage>]{1,4}
default: 0
all elements no refer to parent element's width
border-top-width
more info
medium | thin | thick | <length> all elements no n/a
border-right-width
more info
medium | thin | thick | <length> all elements no n/a
border-bottom-width
more info
medium | thin | thick | <length> all elements no n/a
border-left-width
more info
medium | thin | thick | <length> all elements no n/a
border-width
more info
[thin | medium | thick | <length>]{1,4}
default: not defined
all elements no n/a
border-color
more info
<color>{1,4}
default: the value of the 'color' property
all elements no n/a
border-style
more info
none | dotted | dashed | solid | double | groove | ridge | inset | outset all elements no n/a
border-top
more info
<border-top-width> || <border-style> || <color>
default: not defined
all elements no n/a
border-right
more info
<border-right-width> || <border-style> || <color>
default: not defined
all elements no n/a
border-bottom
more info
<border-bottom-width> || <border-style> || <color>
default: not defined
all elements no n/a
border-left
more info
<border-left-width> || <border-style> || <color>
default: not defined
all elements no n/a
border
more info
<border-width> || <border-style> || <color>
default: not defined
all elements no n/a
width
more info
auto | <length> | <percentage> block-level and replaced elements no refer to parent element's width
height
more info
auto | <length> block-level and replaced elements no n/a
float
more info
none | left | right all elements no n/a
clear
more info
none | left | right | both all elements no n/a
Copyright © 1998-2003 by Radok Corporation

    Classification
  Property  Value  Applies To  Inherited  % Values
display
more info
block | inline | list-item | none all elements no n/a
white-space
more info
normal | pre | nowrap block-level elements yes n/a
list-style-type
more info
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
more info
none | <url> elements with 'display' value 'list-item' yes n/a
list-style-position
more info
outside | inside elements with 'display' value 'list-item' yes n/a
list-style
more info
<keyword> || <position> || <url>
default: not defined
elements with 'display' value 'list-item' yes n/a
Copyright © 1998-2003 by Radok Corporation

    Positioning
  Property  Value  Applies To  Inherited  % Values
position
more info
static | absolute | relative all elements no n/a
left
more info
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
more info
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.
width
more info
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
more info
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
more info
auto | <st-style <shape> elements with the 'position' property of type 'absolute' no n/a
overflow
more info
visible | hidden | scroll | auto elements with the 'position' property of type 'absolute' no n/a
z-index
more info
auto | <integer> positional elements no n/a
visibility
more info
inherit | visible | hidden all elements if value is 'inherit' n/a
Copyright © 1998-2003 by Radok Corporation


   CSS Abbreviations
  Symbol  |  Meaning
< ... > words between "<" and ">" give a type of value (all other words are keywords that must appear literally, without quotes)
/ must appear literally
, must appear literally
[ ... ] grouping
A | B one of A or B must occur
A || B A or B must occur, in either order
* the preceding type, word, or group repeats zero or more times
+ the preceding type, word, or group repeats one or more times
? the preceding type, word, or group is optional
{x,y} the preceding type, word, or group repeats at least x and at most y times, where x and y are integers
Copyright © 1998-2003
by Radok Corporation