CSS LEVEL 1 / CSS-P PROPERTIES, SELECTORS AND @-RULES |
Property values, elements to which properties apply, and browser support |
Inherit? (Y = yes) |
Applies to Elements: |
||||||||
Browser Support |
|||||||||
Property |
Values |
NN4.x |
NN6 |
IE4.x |
IE5 |
IE5.5 |
Page Refs. |
||
Background |
shorthand for background properties |
A |
P,B |
Y |
B |
Y |
Y |
79, 200, 576 |
|
Background-attachment |
scroll , fixed |
A |
— |
Y |
Y |
Y |
Y |
200, 576-578 |
|
Background-color |
color , transparent |
A |
P,B |
Y |
Y |
Y |
Y |
56-57, 73, 78, 192-193, 578 |
|
Background-image |
url(urlstring ), none |
A |
Y |
Y |
Y |
Y |
Y |
78, 135-136, 193, 579 |
|
Background-position |
several possible values (see text) |
B, R |
— |
Y |
B |
Y |
Y |
195-199, 579 |
|
Background-repeat |
no-repeat , repeat, repeat-x, repeat-y |
A |
P |
Y |
B |
Y |
Y |
193-195, 580 |
|
Border |
shorthand for border properties |
A |
P,B |
Y |
Y |
580 |
|||
Border-bottom |
shorthand for bottom border properties |
A |
— |
Y |
P |
P (Y Mac) |
Y |
135, 181-189, 581 |
|
Border-bottom-width |
medium , thick, thin, length |
A |
Y |
Y |
P |
P (Y Mac) |
Y |
174, 181-189, 582 |
|
Border-color |
1 to 4 color values |
A |
P |
Y |
Y |
Y |
Y |
583 |
|
shorthand for left border properties |
A |
— |
Y |
P |
P (Y Mac) |
135, 584 |
|||
Border-left-width |
medium , thick, thin, length |
A |
P |
Y |
P |
P (Y Mac) |
Y |
174, 175-181, 585 |
|
Border-right |
shorthand for right border properties |
A |
— |
Y |
P |
P (Y Mac) |
Y |
585 |
|
Border-right-width |
medium , thick, thin, length |
A |
Y |
Y |
P |
P (Y Mac) |
Y |
174, 175-181, 586 |
|
Border-style |
1 to 4 values, each being dashed, dotted, double, groove, inset, none, outset, ridge, solid |
A |
P |
Y |
P |
P |
P |
587 |
|
Border-top |
shorthand for top border properties |
A |
— |
Y |
P |
P (Y Mac) |
Y |
56-57, 115, 135, 587 |
|
Border-top-width |
medium , thick, thin, length |
A |
Y |
Y |
P |
P (Y Mac) |
Y |
174, 181-189, 588 |
|
Border-width |
shorthand for four border widths |
A |
B |
Y |
P |
P |
Y |
588 |
|
Clear |
both , left, none, right |
A |
B |
Y |
B (Y Mac) |
B (Y Mac) |
Y |
276-277, 279, 590 |
|
Color |
color |
Y |
A |
Y |
Y |
Y |
Y |
Y |
56-57, 83-87, 591 |
Display |
block , inline, list-item, none |
A |
B |
Y |
B |
P (Y Mac) |
P |
200-201, 310, 329, 594 |
|
Float |
left , none, right |
A |
B |
Y |
B |
B (Y Mac) |
Y |
140, 201, 204, 265, 268-270, 340, 596 |
|
Font |
shorthand for font properties |
Y |
A |
font P |
Y |
Y |
Y |
Y |
596 |
Font-family |
comma-separated font names |
Y |
A |
P |
Y |
Y |
Y |
Y |
55-57, 73-76, 448, 450-451, 597 |
Font-size |
xx-small , x-small, small, medium, large, x-large, xx-large, larger, smaller, length, num% |
Y |
A |
Y |
Y |
B |
Y |
Y |
57, 76-77, 451, 598 |
Font-style |
normal , italic, oblique |
Y |
A |
P |
Y |
Y |
Y |
Y |
73, 77, 598 |
Font-variant |
normal , small-caps |
Y |
A |
— |
Y |
Y |
Y |
Y |
73, 77, 79, 80, 451, 599 |
Font-weight |
bolder , lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900 |
Y |
A |
P |
Y |
Y |
Y |
Y |
73, 77, 599 |
Height |
auto , length, num% |
B, R, AP |
P,B |
Y |
Y |
Y |
Y |
128-131, 173, 174, 181-189, 204-206, 600 |
|
Letter-spacing |
normal , length |
Y |
A |
— |
Y |
Y |
Y |
Y |
77, 602 |
Line-height |
normal , length, num, num% |
Y |
B |
P,B |
Y |
Y |
Y |
Y |
169-173, 602 |
List-style |
shorthand for list properties |
Y |
L |
P |
Y |
Y |
Y |
Y |
189, 603 |
List-style-image |
url(urlstring) , none |
Y |
L |
— |
Y |
Y |
Y |
Y |
189-191, 603 |
List-style-position |
inside , outside |
Y |
L |
— |
Y |
Y |
Y |
Y |
188-191, 603 |
circle , disc, none, square, decimal, lower-alpha, lower-roman, upper-alpha, upper-roman |
Y |
L |
Y |
Y |
Y |
Y |
Y |
188-191, 604 |
|
Margin |
shorthand for margin properties |
A |
P,B |
Y |
P,B |
P (Y Mac) |
Y |
173-174, 604 |
|
Margin-bottom |
auto , length, num% |
A |
B |
Y |
P,B |
P (Y Mac) |
Y |
174, 181-189, 269-273, 605 |
|
Margin-left |
auto , length, num% |
A |
B |
Y |
P,B |
P (Y Mac) |
Y |
173-181, 269-273, 605 |
|
Margin-right |
auto , length, num% |
A |
B |
Y |
P,B |
P (Y Mac) |
Y |
174,-181, 269-273, 282, 606 |
|
Margin-top |
auto , length, num% |
A |
B |
Y |
P,B |
P (Y Mac) |
Y |
174, 181-189, 269-273, 282, 606 |
|
Padding |
shorthand for padding properties |
A |
B |
Y |
P |
P (Y Mac) |
Y |
115, 135-136, 173-174, 610 |
|
Padding-bottom |
length , num% |
A |
B |
Y |
P |
P (Y Mac) |
Y |
174, 181-189, 611 |
|
Padding-left |
length , num% |
A |
B |
Y |
P |
P (Y Mac) |
Y |
174, 175-181, 612 |
|
Padding-right |
length , num% |
A |
B |
Y |
P |
P (Y Mac) |
Y |
174-181, 613 |
|
Padding-top |
length , num% |
A |
B |
Y |
P |
P (Y Mac) |
Y |
174, 181-189, 613 |
Other Refs: |
webreview.com/pub/guides/style/style.html |
css.nu/pointers/bugs.html |
www.richinstyle.com/bugs/table.html |
Inherit? (Y = yes) |
Applies to Elements: |
||||||||||||||||||
Browser Support |
|||||||||||||||||||
Property |
Values |
NN4.x |
NN6 |
IE4.x |
IE5.x |
IE5.5 |
Page Refs. |
||||||||||||
Text-align |
center , justify, left, right |
Y |
B |
Y |
Y |
Y |
Y |
Y |
147, 164, 204, 371, 615 |
||||||||||
Text-decoration |
none , or one or more of: blink, line-through, overline, underline |
A |
P |
Y |
P |
P |
P |
73, 77-78, 616 |
|||||||||||
length , num% |
Y |
B |
Y |
Y |
Y |
Y |
Y |
164-165, 617 |
|||||||||||
Text-transform |
capitalize , lowercase, none, uppercase |
Y |
A |
Y |
Y |
Y |
Y |
Y |
78, 617 |
||||||||||
Vertical-align |
baseline , sub, super ,top, text-top, middle, bottom, text-bottom, num% |
I |
P,B |
Y |
P |
P (Y Mac) |
P |
115, 131-134, 139, 370, 619 |
|||||||||||
White-space |
normal , nowrap, pre |
Y |
B |
P |
Y |
— |
— (Y Mac) |
P |
166-168, 621 |
||||||||||
Width |
auto , length, num% |
B, R, AP |
B |
Y |
B |
B (Y Mac) |
Y |
128-131, 173-174,-181, 204-206, 375-377, 621 |
|||||||||||
Word-spacing |
normal , length |
Y |
A |
— |
Y |
— (Y Mac) |
— (Y Mac) |
— |
78, 164, 623 |
||||||||||
Clip |
auto , rect(len1, len2, len3, len4) |
AP |
Y |
Y |
B |
Y |
Y |
310, 315, 3316-317, 590 |
|||||||||||
Left |
auto , length, num% |
AP,RP |
Y |
Y |
B |
Y |
Y |
310, 312-314, 319-321, 601 |
|||||||||||
Overflow |
none , clip, scroll |
AP,RP |
Y |
Y |
B |
Y |
Y |
310, 315-319, 182-184, 281-282, 610 |
|||||||||||
Position |
absolute , relative, static |
A |
Y |
Y |
B |
Y |
Y |
309, 310-317, 613 |
|||||||||||
Top |
auto , length, num% |
AP,RP |
Y |
Y |
B |
Y |
Y |
310, 312-314, 319-321, 618 |
|||||||||||
Visibility |
hidden , inherit, visible |
(Y if inherit) |
A |
Y |
Y |
B |
Y |
Y |
310, 324-329, 382-385, 620 |
||||||||||
Z-index |
auto , int |
AP,RP |
Y |
Y |
B |
Y |
Y |
310, 311, 314-315, 322-326, 623 |
|||||||||||
Pseudo-Elements, Pseudo-Classs and Special CSS Declarations |
|||||||||||||||||||
:first-line |
— |
Y |
— |
— (Y Mac) |
Y |
168-170 |
|||||||||||||
:first-letter |
— |
B |
— |
— (Y Mac) |
Y |
168-170 |
|||||||||||||
:link |
Y |
Y |
Y |
Y |
Y |
108-109, 110, 112 |
|||||||||||||
:visited |
B |
Y |
Y |
Y |
Y |
108,109, 110-112 |
|||||||||||||
:active |
B |
Y |
Y |
Y |
Y |
110, 112 |
|||||||||||||
:hover (CSS Level 2) |
— |
Y |
Y |
Y |
Y |
109-111, 111-112 |
|||||||||||||
!important |
— |
Y |
Win |
Y |
Y |
87, 443, 445-448 |
|||||||||||||
@import |
— |
Y |
Y |
Y |
Y |
443-445, 446 |
NN4, NN6 Netscape Navigator 4 and 6 |
NOTE: IE 5.5 available for Windows 9x/NT/2000 Only |
IE4, IE5, IE5.5 Microsoft Internet Explorer 4, 5, and 5.5 |
Key To
"Applies to Elements" and "Browser Support" Columns
Formatting types |
Browser support symbols and Keywords |
|||
Value |
Meaning |
Value |
Meaning |
|
A |
Applies to all elements |
— (long dash) |
Not supported |
|
B |
Applies to block-level elements |
Y |
All values supported |
|
I |
Applies to inline elements |
P |
Partial support -- some values not supported |
|
R |
Applies to replaced elements |
B |
Some bugs in implementation |
|
AP |
Applies to absolutely positioned elements |
B! |
Many bugs in implementation |
|
RP |
Applies to relatively positioned elements |
Mac |
Macintosh-specific |
|
Win |
Microsoft Windows-specific |
Definition of Property Value Keywords
User-defined property values |
Margin/Padding/Border shorthand values |
||||
Value |
Description |
Value Assignment |
Meaning |
||
urlstring |
A partial or complete URL |
property : v1 |
All sides given value v1 |
||
color |
A color specified as a named color (see Appendix A), or as an RGB code using the syntax #rrggbb, #rgb, rgb(red,green,blue) or rgb(red%,green%,blue%) |
property : v1 v2 v3 |
Top given value v1, right given value v2, bottom given value v3, left given value v2 |
||
length |
A length specified in relative (em, ex) or absolute (cm, mm, in, pc, pt, px) length units. Can be a positive or, depending on the property, a negative value. |
property : v1 v2 v3 v4 |
Top given value v1, right given value v2, bottom given value v3, left given value v4 |
||
num; num% |
A real number; a percentage (real) length value. |
property : v1 v2 |
Top and bottom given value v1; right and left given value v2 |
||
int |
A positive or negative integer. |