Web browser CSS support

This document is a section of the web browser standards support document. It includes detailed information about CSS support in major web browsers.

Pick browsers to display

Table of Contents

  1. About
  2. Specifications
  3. CSS 2.1 features
    1. Units
    2. Importance
    3. At-rules
    4. Basic selectors
    5. Pseudo-classes
    6. Pseudo-elements
    7. Basic properties
    8. Print properties
    9. Conformance
  4. CSS 3 features
    1. Units
    2. At-rules
    3. Basic selectors
    4. Pseudo-classes
    5. Pseudo-elements
    6. Basic properties
    7. Print properties

About

Up

CSS is the primary language for adding presentation elements to a webpage. These presentation elements include colors, fonts, backgrounds, and layout.

View this page without CSS

Specifications

Up

CSS 2.1 features

Up

CSS 2.1 Units

Up

The following are units that are used in CSS properties. The values reflect the browser's best support for these units. Support may be weaker in some properties. See the specific property information for details.

CSS 2.1 Units
Feature Safari 2
Color
(General) Y
#rrggbb Y
#rgb Y
rgb(<red>, <green>, <blue>) I
aqua Y
black Y
blue Y
fuchsia Y
gray Y
green Y
lime Y
maroon Y
navy Y
olive Y
orange Y
purple Y
red Y
silver Y
teal Y
white Y
yellow Y
ActiveBorder Y
ActiveCaption Y
AppWorkspace Y
Background Y
ButtonFace Y
ButtonHighlight Y
ButtonShadow Y
ButtonText Y
CaptionText Y
GrayText Y
Highlight Y
HighlightText Y
InactiveBorder Y
InactiveCaption Y
InactiveCaptionText Y
InfoBackground Y
InfoText Y
Menu Y
MenuText Y
Scrollbar Y
ThreeDDarkShadow Y
ThreeDFace Y
ThreeDHighlight Y
ThreeDLightShadow Y
ThreeDShadow Y
Window Y
WindowFrame Y
WindowText Y
Counter
(General) N
Integer
(General) Y
Length
(General) Y
em Y
ex Y
px Y
in Y
cm Y
mm Y
pt Y
pc Y
Number
(General) Y
Percentage
(General) Y
String
(General) Y
URI
(General) Y

CSS 2.1 Importance

Up

Importance gives dominance to CSS rules that would normally be overridden by rules of greater specificity or latter appearance.

CSS 2.1 Importance
Feature Safari 2
!important
(General) Y

CSS 2.1 At-rules

Up

At-rules provide special operations and selection mechanisms for the CSS document.

CSS 2.1 At-rules
Feature Safari 2
@charset
(General) N
@import
(General) Y
@media
(General) Y
@page
(General) N
:left N
:right N
:first N

CSS 2.1 Basic selectors

Up

Selectors specify where CSS rules are applied on the document.

CSS 2.1 Basic selectors
Feature Safari 2
*
(General) Y
E
(General) Y
E F
(General) Y
E > F
(General) Y
E + F
(General) Y
[attr]
(General) Y
[attr="value"]
(General) Y
[attr~="value"]
(General) Y
[attr|="value"]
(General) Y
.class
(General) Y
#id
(General) Y

CSS 2.1 Pseudo-classes

Up

Pseudo-classes select elements in certain special states.

CSS 2.1 Pseudo-classes
Feature Safari 2
:active
(General) Y
:first-child
(General) I
:focus
(General) Y
:hover
(General) Y
:lang(C)
(General) N
:link
(General) Y
:visited
(General) Y

CSS 2.1 Pseudo-elements

Up

Pseudo-elements are styled portions of the displayed page that were created by one of the following selectors.

CSS 2.1 Pseudo-elements
Feature Safari 2
:after
(General) Y
:before
(General) Y
:first-letter
(General) Y
:first-line
(General) Y

CSS 2.1 Basic properties

Up

The following are CSS properties that are used in normal graphical webpage displays in web browsers.

CSS 2.1 Basic properties
Feature Safari 2
background
(General) Y
(background-color) ≈100%
(background-image) Y
(background-repeat) 60%
(background-attachment) Y
(background-position) 94%
inherit Y
background-attachment
(General) Y
scroll Y
fixed Y
inherit Y
background-color
(General) Y
(Color) 99%
transparent Y
inherit Y
background-image
(General) Y
(URI) Y
none Y
inherit Y
background-position
(General) I
(Percentage) Y
(Length) Y
left Y
center (horizontal) Y
right Y
top Y
center (vertical) Y
bottom Y
inherit Y
background-repeat
(General) I
repeat Y
repeat-x I
repeat-y I
no-repeat I
inherit Y
border
(General) Y
(border-width) Y
(border-style) Y
(border-top-color) ≈100%
inherit Y
border-bottom
(General) Y
(border-width) Y
(border-style) Y
(border-top-color) ≈100%
inherit Y
border-bottom-color
(General) Y
(Color) 99%
transparent Y
inherit Y
border-bottom-style
(General) Y
none Y
hidden Y
dotted Y
dashed Y
solid Y
double Y
groove Y
ridge Y
inset Y
outset Y
inherit Y
border-bottom-width
(General) Y
thin Y
medium Y
thick Y
(Length) Y
inherit Y
border-collapse
(General) ?
collapse ?
separate ?
inherit ?
border-color
(General) Y
(Color) 99%
transparent Y
inherit Y
border-left
(General) Y
(border-width) Y
(border-style) Y
(border-top-color) ≈100%
inherit Y
border-left-color
(General) Y
(Color) 99%
transparent Y
inherit Y
border-left-style
(General) Y
none Y
hidden Y
dotted Y
dashed Y
solid Y
double Y
groove Y
ridge Y
inset Y
outset Y
inherit Y
border-left-width
(General) Y
thin Y
medium Y
thick Y
(Length) Y
inherit Y
border-right
(General) Y
(border-width) Y
(border-style) Y
(border-top-color) ≈100%
inherit Y
border-right-color
(General) Y
(Color) 99%
transparent Y
inherit Y
border-right-style
(General) Y
none Y
hidden Y
dotted Y
dashed Y
solid Y
double Y
groove Y
ridge Y
inset Y
outset Y
inherit Y
border-right-width
(General) Y
thin Y
medium Y
thick Y
(Length) Y
inherit Y
border-spacing
(General) ?
(Length) ?
inherit ?
border-style
(General) Y
none Y
hidden Y
dotted Y
dashed Y
solid Y
double Y
groove Y
ridge Y
inset Y
outset Y
inherit Y
border-top
(General) Y
(border-width) Y
(border-style) Y
(border-top-color) ≈100%
inherit Y
border-top-color
(General) Y
(Color) 99%
transparent Y
inherit Y
border-top-style
(General) Y
none Y
hidden Y
dotted Y
dashed Y
solid Y
double Y
groove Y
ridge Y
inset Y
outset Y
inherit Y
border-top-width
(General) Y
thin Y
medium Y
thick Y
(Length) Y
inherit Y
border-width
(General) Y
thin Y
medium Y
thick Y
(Length) Y
inherit Y
bottom
(General) ?
(Length) ?
(Percentage) ?
auto ?
inherit ?
caption-side
(General) ?
top ?
bottom ?
inherit ?
clear
(General) ?
none ?
left ?
right ?
both ?
inherit ?
clip
(General) ?
rect(<top>, <right>, <bottom>, <left>) ?
auto ?
inherit ?
color
(General) ?
(Color) ?
inherit ?
content
(General) ?
none ?
normal ?
(String) ?
(URI) ?
counter(<counter>) ?
counter(<counter>, <list-style-type>) ?
counters(<counter>, <string>) ?
counters(<counter>, <string>, <list-style-type>) ?
attr(<attr>) ?
open-quote ?
close-quote ?
no-open-quote ?
no-close-quote ?
inherit ?
counter-increment
(General) ?
(Counter) ?
(Integer) ?
none ?
inherit ?
counter-reset
(General) ?
(Counter) ?
(Integer) ?
none ?
inherit ?
cursor
(General) ?
(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 ?
direction
(General) ?
ltr ?
rtl ?
inherit ?
display
(General) ?
inline ?
block ?
list-item ?
run-in ?
inline-block ?
table ?
inline-table ?
table-row-group ?
table-header-group ?
table-footer-group ?
table-row ?
table-column-group ?
table-column ?
table-cell ?
table-caption ?
none ?
inherit ?
empty-cells
(General) ?
show ?
hide ?
inherit ?
float
(General) ?
left ?
right ?
none ?
inherit ?
font
(General) ?
(font-style) ?
(font-variant) ?
(font-weight) ?
(font-size) ?
(line-height) ?
(font-family) ?
caption N
icon N
menu N
message-box N
small-caption N
status-bar N
inherit ?
font-family
(General) ?
(Family name) ?
serif ?
sans-serif ?
cursive ?
fantasy ?
monospace ?
inherit ?
font-size
(General) ?
(Length) ?
(Percentage) ?
xx-small ?
x-small ?
small ?
medium ?
large ?
x-large ?
xx-large ?
larger ?
smaller ?
inherit ?
font-style
(General) ?
normal ?
italic ?
oblique ?
inherit ?
font-variant
(General) ?
normal ?
small-caps ?
inherit ?
font-weight
(General) ?
normal ?
bold ?
bolder ?
lighter ?
100 ?
200 ?
300 ?
400 ?
500 ?
600 ?
700 ?
800 ?
900 ?
inherit ?
height
(General) ?
(Length) ?
(Percentage) ?
auto ?
inherit ?
left
(General) ?
(Length) ?
(Percentage) ?
auto ?
inherit ?
letter-spacing
(General) ?
normal ?
(Length) ?
inherit ?
line-height
(General) ?
normal ?
(Number) ?
(Length) ?
(Percentage) ?
inherit ?
list-style
(General) ?
(list-style-type) ?
(list-style-position) ?
(list-style-image) ?
inherit ?
list-style-image
(General) ?
(URI) ?
none ?
inherit ?
list-style-position
(General) ?
inside ?
outside ?
inherit ?
list-style-type
(General) ?
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 ?
margin
(General) ?
(Length) ?
(Percentage) ?
auto ?
inherit ?
margin-bottom
(General) ?
(Length) ?
(Percentage) ?
auto ?
inherit ?
margin-left
(General) ?
(Length) ?
(Percentage) ?
auto ?
inherit ?
margin-right
(General) ?
(Length) ?
(Percentage) ?
auto ?
inherit ?
margin-top
(General) ?
(Length) ?
(Percentage) ?
auto ?
inherit ?
max-height
(General) ?
(Length) ?
(Percentage) ?
none ?
inherit ?
max-width
(General) ?
(Length) ?
(Percentage) ?
none ?
inherit ?
min-height
(General) ?
(Length) ?
(Percentage) ?
inherit ?
min-width
(General) ?
(Length) ?
(Percentage) ?
inherit ?
outline
(General) ?
(outline-color) ?
(outline-style) ?
(outline-width) ?
inherit ?
outline-color
(General) ?
(Color) ?
invert ?
inherit ?
outline-style
(General) ?
(border-style) ?
inherit ?
outline-width
(General) ?
(border-width) ?
inherit ?
overflow
(General) ?
visible ?
hidden ?
scroll ?
auto ?
inherit ?
padding
(General) ?
(Length) ?
(Percentage) ?
inherit ?
padding-bottom
(General) ?
(Length) ?
(Percentage) ?
inherit ?
padding-left
(General) ?
(Length) ?
(Percentage) ?
inherit ?
padding-right
(General) ?
(Length) ?
(Percentage) ?
inherit ?
padding-top
(General) ?
(Length) ?
(Percentage) ?
inherit ?
position
(General) ?
static ?
relative ?
absolute ?
fixed ?
inherit ?
quotes
(General) ?
(String) ?
none ?
inherit ?
right
(General) ?
(Length) ?
(Percentage) ?
auto ?
inherit ?
table-layout
(General) ?
auto ?
fixed ?
inherit ?
text-align
(General) ?
left ?
right ?
center ?
justify ?
inherit ?
text-decoration
(General) ?
none ?
underline ?
overline ?
line-through ?
blink ?
inherit ?
text-indent
(General) ?
(Length) ?
(Percentage) ?
inherit ?
text-transform
(General) ?
capitalize ?
uppercase ?
lowercase ?
none ?
inherit ?
top
(General) ?
(Length) ?
(Percentage) ?
auto ?
inherit ?
unicode-bidi
(General) ?
normal ?
embed ?
bidi-override ?
inherit ?
vertical-align
(General) ?
baseline ?
sub ?
super ?
top ?
text-top ?
middle ?
bottom ?
text-bottom ?
(Percentage) ?
(Length) ?
inherit ?
visibility
(General) ?
visible ?
hidden ?
collapse ?
inherit ?
white-space
(General) ?
normal ?
pre ?
nowrap ?
pre-wrap ?
pre-line ?
inherit ?
width
(General) ?
(Length) ?
(Percentage) ?
auto ?
inherit ?
word-spacing
(General) ?
normal ?
(Length) ?
inherit ?
z-index
(General) ?
auto ?
(Integer) ?
inherit ?

CSS 2.1 Print properties

Up

The following CSS properties allow special formatting on paged media, such as pages printed with a printer.

CSS 2.1 Print properties
Feature Safari 2
orphans
(General) ?
(Integer) ?
inherit ?
page-break-after
(General) N
auto N
always N
avoid N
left N
right N
inherit N
page-break-before
(General) N
auto N
always N
avoid N
left N
right N
inherit N
page-break-inside
(General) N
avoid N
auto N
inherit N
widows
(General) ?
(Integer) ?
inherit ?

CSS 2.1 Conformance

Up

The following summarizes the requirements for a web browser to claim full support for CSS 2.1. A web browser may not claim full conformance unless all of the following are met. Each of these points is graded on an all-or-nothing basis.

CSS 2.1 Conformance
Feature Safari 2
Conformance
Support a media type Y
Attempt to retrieve all style sheets Y
Follow all specified grammar N
Assign elements all applicable properties N
Support alternate style sheets N
Allow disabling author style sheet N
Support user style sheets Y

CSS 3 features

Up

The following are features that have been added or significantly changed in CSS 3. The sections of CSS 3 shown below have reached at least the Candidate Recommendation stage, which means these features are ready to be implemented in user agents.

CSS 3 Units

Up

The following are units that are used in CSS properties. The values reflect the browser's best support for these units. Support may be weaker in some properties. See the specific property information for details.

CSS 3 Units
Feature Safari 2
Appearance
(General) N
icon N
window N
desktop N
workspace N
document N
tooltip N
dialog N
button N
push-button N
hyperlink N
radio-button N
checkbox N
menu-item N
tab N
menu N
menubar N
pull-down-menu N
pop-up-menu N
list-menu N
radio-group N
checkbox-group N
outline-tree N
range N
field N
combo-box N
signature N
password N
Color
rgba(<red>, <green>, <blue>, <alpha>) Y
transparent Y
hsl(<hue>, <saturation>, <lightness>) N
hsla(<hue>, <saturation>, <lightness>, <alpha>) N
currentColor N
flavor N
aliceblue Y
antiquewhite Y
aquamarine Y
azure Y
beige Y
bisque Y
blanchedalmond Y
blueviolet Y
brown Y
burlywood Y
cadetblue Y
chartreuse Y
chocolate Y
coral Y
cornflowerblue Y
cornsilk Y
crimson Y
cyan Y
darkblue Y
darkcyan Y
darkgoldenrod Y
darkgray Y
darkgreen Y
darkgrey Y
darkkhaki Y
darkmagenta Y
darkolivegreen Y
darkorange Y
darkorchid Y
darkred Y
darksalmon Y
darkseagreen Y
darkslateblue Y
darkslategray Y
darkslategrey Y
darkturquoise Y
darkviolet Y
deeppink Y
deepskyblue Y
dimgray Y
dimgrey Y
dodgerblue Y
firebrick Y
floralwhite Y
forestgreen Y
gainsboro Y
ghostwhite Y
gold Y
goldenrod Y
greenyellow Y
grey Y
honeydew Y
hotpink Y
indianred Y
indigo Y
ivory Y
khaki Y
lavender Y
lavenderblush Y
lawngreen Y
lemonchiffon Y
lightblue Y
lightcoral Y
lightcyan Y
lightgoldenrodyellow Y
lightgray Y
lightgreen Y
lightgrey Y
lightpink Y
lightsalmon Y
lightseagreen Y
lightskyblue Y
lightslategray Y
lightslategrey Y
lightsteelblue Y
lightyellow Y
limegreen Y
linen Y
magenta Y
mediumaquamarine Y
mediumblue Y
mediumorchid Y
mediumpurple Y
mediumseagreen Y
mediumslateblue Y
mediumspringgreen Y
mediumturquoise Y
mediumvioletred Y
midnightblue Y
mintcream Y
mistyrose Y
moccasin Y
navajowhite Y
oldlace Y
olivedrab Y
orangered Y
orchid Y
palegoldenrod Y
palegreen Y
paleturquoise Y
palevioletred Y
papayawhip Y
peachpuff Y
peru Y
pink Y
plum Y
powderblue Y
rosybrown Y
royalblue Y
saddlebrown Y
salmon Y
sandybrown Y
seagreen Y
seashell Y
sienna Y
skyblue Y
slateblue Y
slategray Y
slategrey Y
snow Y
springgreen Y
steelblue Y
tan Y
thistle Y
tomato Y
turquoise Y
violet Y
wheat Y
whitesmoke Y
yellowgreen Y
Counter
pages N
ID
(General) ?
Target name
(General) ?

CSS 3 At-rules

Up

At-rules provide special operations and selection mechanisms for the CSS document.

CSS 3 At-rules
Feature Safari 2
@color-profile
(General) ?
name ?
src ?
rendering-intent ?
@media
width ?
min-width ?
max-width ?
height ?
min-height ?
max-height ?
device-width ?
min-device-width ?
max-device-width ?
device-height ?
min-device-height ?
max-device-height ?
device-aspect-ratio ?
min-device-aspect-ratio ?
max-device-aspect-ratio ?
color ?
min-color ?
max-color ?
color-index ?
min-color-index ?
max-color-index ?
monochrome ?
min-monochrome ?
max-monochrome ?
resolution ?
min-resolution ?
max-resolution ?
scan ?
grid ?
@page
@top ?
@top-left-corner ?
@top-left ?
@top-center ?
@top-right ?
@top-right-corner ?
@bottom ?
@bottom-left-corner ?
@bottom-left ?
@bottom-center ?
@bottom-right ?
@bottom-right-corner ?
@left-top ?
@left-middle ?
@left-bottom ?
@right-top ?
@right-middle ?
@right-bottom ?
@float-area ?
(Page name) ?

CSS 3 Basic selectors

Up

Selectors specify where CSS rules are applied on the document.

CSS 3 Basic selectors
Feature Safari 2
E ~ F
(General) N
[attr^="value"]
(General) Y
[attr$="value"]
(General) Y
[attr*="value"]
(General) Y

CSS 3 Pseudo-classes

Up

Pseudo-classes select elements in certain special states.

CSS 3 Pseudo-classes
Feature Safari 2
:root
(General) Y
:nth-child(N)
(General) N
b N
an N
an+b N
odd N
even N
:nth-last-child(N)
(General) N
b N
an N
an+b N
odd N
even N
:nth-of-type(N)
(General) N
b N
an N
an+b N
odd N
even N
:nth-last-of-type(N)
(General) N
b N
an N
an+b N
odd N
even N
:last-child
(General) I
:first-of-type
(General) N
:last-of-type
(General) N
:only-child
(General) I
:only-of-type
(General) N
:empty
(General) I
:target
(General) Y
:enabled
(General) N
:disabled
(General) N
:checked
(General) N
:contains(C)
(General) N
:not(S)
(General) Y
:default
(General) N
:valid
(General) N
:invalid
(General) N
:in-range
(General) N
:out-of-range
(General) N
:required
(General) N
:optional
(General) N
:read-only
(General) N
:read-write
(General) N

CSS 3 Pseudo-elements

Up

Pseudo-elements are styled portions of the displayed page that were created by one of the following selectors.

CSS 3 Pseudo-elements
Feature Safari 2
::selection
(General) I
::value
(General) N
::choices
(General) N
::repeat-item
(General) N
::repeat-index
(General) N

CSS 3 Basic properties

Up

The following are CSS properties that are used in normal graphical webpage displays in web browsers.

CSS 3 Basic properties
Feature Safari 2
appearance
(General) ?
(Appearance) ?
normal ?
inherit ?
box-sizing
(General) ?
content-box ?
border-box ?
inherit ?
color
attr(<attr>, color) ?
color-profile
(General) ?
(Profile name) ?
(URI) ?
auto ?
sRGB ?
inherit ?
content
(Appearance) ?
icon ?
cursor
(General) ?
(Number) ?
none ?
context-menu ?
cell ?
vertical-text ?
alias ?
copy ?
no-drop ?
not-allowed ?
ew-resize ?
ns-resize ?
nesw-resize ?
nwse-resize ?
col-resize ?
row-resize ?
all-scroll ?
display
ruby ?
ruby-base ?
ruby-base-container ?
ruby-text ?
ruby-text-container ?
font
(Appearance) ?
icon
(General) ?
(URI) ?
auto ?
inherit ?
nav-down
(General) ?
(ID) ?
current ?
root ?
(Target name) ?
inherit ?
nav-index
(General) ?
(Number) ?
auto ?
inherit ?
nav-left
(General) ?
(ID) ?
current ?
root ?
(Target name) ?
inherit ?
nav-right
(General) ?
(ID) ?
current ?
root ?
(Target name) ?
inherit ?
nav-up
(General) ?
(ID) ?
current ?
root ?
(Target name) ?
inherit ?
opacity
(General) ?
(Number) ?
outline-offset
(General) ?
(Length) ?
inherit ?
rendering-intent
(General) ?
auto ?
perceptual ?
relative-colorimetric ?
saturation ?
absolute-colorimetric ?
inherit ?
resize
(General) ?
none ?
horizontal ?
vertical ?
inherit ?
ruby-align
(General) ?
auto ?
start ?
left ?
center ?
end ?
right ?
distribute-letter ?
distribute-space ?
line-edge ?
inherit ?
initial ?
ruby-overhang
(General) ?
auto ?
start ?
end ?
none ?
inherit ?
initial ?
ruby-position
(General) ?
before ?
after ?
right ?
inherit ?
initial ?
ruby-span
(General) ?
attr(<attr>) ?
none ?
inherit ?
initial ?

CSS 3 Print properties

Up

The following CSS properties allow special formatting on paged media, such as pages printed with a printer.

CSS 3 Print properties
Feature Safari 2
image-orientation
(General) ?
(Angle) ?
auto ?
page
(General) ?
(Page name) ?
auto ?
page-policy
(General) ?
start ?
first ?
last ?
size (@page)
(General) ?
(Length) ?
auto ?
landscape ?
portrait ?
A5 ?
A4 ?
A3 ?
B5 ?
B4 ?
letter ?
legal ?
ledger ?