XML technologies / CSS / CSS Cookbook / CSS 2.1: properties and proprietary extensions / CSS 2.1 properties

(Excerpt from “CSS Kochbuch” by Christopher Schmitt)

 

Name

Values

Initial value

Applies to
(default: all)

Inherited?

Percentages allowed?
(default: no)

Media type

background-attachment

scroll | fixed | inherit

scroll

no

visual

background-color

<Farbwert> | transparent | inherit

transparent

no

visual

background-image

<URI> | none | inherit

none

no

visual

background-position

[ [<Prozentwert> | <Längenangabe> | left | center | right ] [<Prozentwert> | <Längenangabe> | top | center | bottom]? ] | [ [ left | center | right ] || [ top | center | bottom ] ] | inherit

0% 0%

no

refer to the corresponding point of the element and the original image

visual

background-repeat

repeat | repeat-x | repeat-y | no-repeat | inherit

repeat

no

visual

background

[ <backgroundcolor> || <backgroundimage> || <background- repeat> || <backgroundattachment> || <backgroundposition>] | inherit

see individual properties

no

allowed for background-position

visual

border-collapse

collapse | separate | inherit

separate

elements whose property display has the value table or inlinetable

yes

visual

border-color

[ <Farbwert> | transparent ]{1,4} | inherit

see individual properties

no

visual

border-spacing

<Längenangabe> <Längenangabe>? | inherit

0

elements whose property display has the value table or inlinetable

yes

visual

border-style

<border-style> {1,4} | inherit

see individual properties

no

visual

border-top border-right borderbottom border-left

[ <border-width> || <border-style> || <border-top-color> ] | inherit

see individual properties

no

visual

border-top-color border-right-color border-bottom-color border-left-color

<Farbwert> | transparent | inherit

The value of the property color

no

visual

border-top-style border-right-style border-bottom-style border-left-style

<border-style> | inherit

none

no

visual

border-top-width border-right-width border-bottom-width border-left-width

<border-width> | inherit

medium

no

visual

border-width

<border-width> {1,4} | inherit

see individual properties

no

visual

border

[ <border-width> ||<border-style> || <border-topcolor>] | inherit

see individual properties

no

visual

bottom

<Längenangabe> | <Prozentwert> | auto | inherit

auto

positioned elements

no

refer to the height of the containing block

visual

caption-side

top | bottom | inherit

top

elements whose property display has the value table-caption

yes

visual

clear

none | left | right | both | inherit

none

Block elements

no

visual

clip

<Form> | auto | inherit

auto

absolutely positioned elements

no

visual

color

<Farbwert> | inherit

user-agent-dependent

yes

visual

content

normal | none | [<Zeichenkette> | <URI> | <Zähler> | attr(<Identifier>) | open-quote | closequote | no-openquote | no-closequote]+ | inherit

normal

the pseudo-elements :before and :after

no

all

counter-increment

[<Identifier> <Integerwert>?]+ | none | inherit

none

no

all

counter-reset

[<Identifier> <Integerwert>? ]+ | none | inherit

none

no

all

cursor

[ [ <URI> ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | progress ] ] | inherit

auto

yes

visual, interactive

direction

inline | block | listitem | run-in | inline-block | table | inline-table | tablerow-group | tableheader- group | table-footer-group | table-row | tablecolumn-group | table-column | table-cell | tablecaption | none | inherit

inline

no

all

empty-cells

show | hide | inherit

show

elements whose property display has the value table-cell

yes

visual

float

left | right | none | inherit

none

all; for details, see the recipe Displaying floated columns in any order

no

visual

font-family

[[ <Schriftfamilie> | <allgemeine Schriftfamilie> ] [,<Schriftfamilie>| <allgemeine Schriftfamilie> ]* ] | inherit

user-agent-dependent

yes

visual

font-size

<absolute Größe> | <relative Größe> | <Längenangabe> | <Prozentwert> | inherit

medium

yes

refer to the computed value of font-size for the parent element

visual

font-style

normal | italic | oblique | inherit

normal

yes

visual

font-variant

normal | small-caps | inherit

normal

yes

visual

font-weight

normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit

normal

yes

visual

font

[ [ <font-style> || <font-variant> || <font-weight> ]? <font-size> [ / <line-height> ]? <font-family> ] | caption | icon | menu | messagebox | small-caption | status-bar | inherit

see individual properties

yes

see individual properties

visual

height

<Längenangabe> | <Prozentwert> | auto | inherit

auto

block and replaced elements

no

calculated relative to the height of the containing block

visual

left

<Längenangabe> | <Prozentwert> | auto | inherit

auto

positioned elements

no

refer to the width of the containing block

visual

letter-spacing

normal | <Längenangabe> | inherit

normal

yes

visual

line-height

normal | <number> | <Längenangabe> | <Prozentwert> | inherit

normal

yes

relative to the element’s font size (font-size)

visual

list-style-image

<URI> | none | inherit

none

elements whose property display has the value list-item

yes

visual

list-style-position

inside | outside | inherit

outside

elements whose property display has the value list-item

yes

visual

list-style-type

disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit

disc

elements whose property display has the value list-item

yes

visual

list-style

[<list-style-type> || <list-style-position> || <list-style-image>] | inherit

see individual properties

elements whose property display has the value list-item

yes

visual

margin-right
margin-left

<Breite> | <Prozentwert> | auto | inherit

0

all elements except table elements whose property display has a value other than table or inline-table.

no

refer to the width of the containing block

visual

margin-top
margin-bottom

<Breite> | <Prozentwert> | auto | inherit

0

all elements except table elements whose property display has a value other than table or inline-table.

no

refer to the width of the containing block

visual

margin

<margin-width> { 1,4} | inherit

see individual properties

all elements except table elements whose property display has a value other than table or inline-table.

no

refer to the width of the containing block

visual

max-height

<Längenangabe> | <Prozentwert> | none | inherit

none

all elements except non-replaced inline elements and table elements

no

refer to the height of the containing block

visual

max-width

<Längenangabe> | <Prozentwert> | none | inherit

none

all elements except non-replaced inline elements and table elements

no

refer to the width of the containing block

visual

min-height

<Längenangabe> | <Prozentwert> | inherit

0

all elements except non-replaced inline elements and table elements

no

refer to the height of the containing block

visual

min-width

<Längenangabe> | <Prozentwert> | inherit

0

all elements except non-replaced inline elements and table elements

no

refer to the width of the containing block

visual

orphans

<Integerwert> | inherit

2

block elements

yes

visual, paged

outline-color

<Farbwert> | invert | inherit

invert

no

visual, interactive

outline-style

<border-style> | inherit

none

no

visual, interactive

outline-width

<border-width> | inherit

medium

no

visual, interactive

outline

[ <outline-color> || <outline-style> || <outline-width> ] | inherit

see individual properties

no

visual, interactive

overflow

visible | hidden | scroll | auto | inherit

visible

block and replaced elements

no

visual

padding-top padding-right padding-bottom padding-left

<padding-width> | inherit

0

all elements except table elements whose property display has a value other than table, inline-table or table-cell.

no

refer to the width of the containing block

visual

padding

<padding-width> {1,4} | inherit

see individual properties

all elements except table elements whose property display has a value other than table, inline-table or table-cell.

no

refer to the width of the containing block

visual

page-break-after

auto | always | avoid | left | right | inherit

auto

block elements

no

visual, paged

page-break-before

auto | always | avoid | left | right | inherit

auto

block elements

no

visual, paged

page-break-inside

avoid | auto | inherit

auto

block elements

yes

visual, paged

position

static | relative | absolute | fixed | inherit

static

no

visual

quotes

[<Zeichenkette> <Zeichenkette>]+ | none | inherit

user-agent-dependent

yes

visual

right

<Längenangabe> | <Prozentwert> | auto | inherit

auto

positioned elements

no

refer to the width of the containing block

visual

table-layout

auto | fixed | inherit

auto

elements whose property display has the value table or inline-table

no

visual

text-align

left | right | center | justify | inherit

user-agent-dependent; may also depend on the writing direction (property ltr)

block elements and elements whose property display has the value table-cell or inline-block

yes

visual

text-decoration

none | [ underline || overline || linethrough || blink ] | inherit

none

no

visual

text-indent

<Längenangabe> | <Prozentwert> | inherit

0

block elements and elements whose property display has the value table-cell or inline-block

yes

refer to the width of the containing block

visual

text-transform

capitalize | uppercase | lowercase | none | inherit

none

yes

visual

top

<Längenangabe> | <Prozentwert> | auto | inherit

auto

positioned elements

no

refer to the height of the containing block

visual

unicode-bidi

normal | embed | bidi-override | inherit

normal

all elements

no

visual

vertical-align

baseline | sub | super | top | text-top | middle | bottom | text-bottom | <Prozentwert> | <Längenangabe> | inherit

baseline

inline elements and table cells

no

refer to the value of line-height for the element concerned

visual

visibility

visible | hidden | collapse | inherit

visible

yes

visual

white-space

normal | pre | nowrap | pre-wrap | pre-line | inherit

normal

yes

visual

widows

<Integerwert> | inherit

2

block elements

yes

visual

width

<Längenangabe> | <Prozentwert> | auto | inherit

auto

block elements and replaced inline elements

no

refer to the width of the containing block

visual

word-spacing

normal | <Längenangabe> | inherit

normal

yes

visual

z-index

auto | <Integerwert> | inherit

auto

positioned elements

no

visual

The CSS 2.1 property table is copyrighted: © 2005, World Wide Web Consortium (Massachusetts Institute of Technology, European Research Consortium for Informatics and Mathematics, Keio University). All rights reserved. W3C DOCUMENT LICENSE.

  

 

 

 

back to top