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 IE 6 IE 7 Firefox 2 Firefox 3 Opera 9
Color
(General) Y Y Y Y Y
#rrggbb Y Y Y Y I
#rgb Y Y Y Y I
rgb(<red>, <green>, <blue>) I I Y Y I
aqua Y Y Y Y Y
black Y Y Y Y Y
blue Y Y Y Y Y
fuchsia Y Y Y Y Y
gray Y Y Y Y Y
green Y Y Y Y Y
lime Y Y Y Y Y
maroon Y Y Y Y Y
navy Y Y Y Y Y
olive Y Y Y Y Y
orange Y Y Y Y Y
purple Y Y Y Y Y
red Y Y Y Y Y
silver Y Y Y Y Y
teal Y Y Y Y Y
white Y Y Y Y Y
yellow Y Y Y Y Y
ActiveBorder Y Y Y Y Y
ActiveCaption Y Y Y Y Y
AppWorkspace Y Y Y Y Y
Background Y Y Y Y Y
ButtonFace Y Y Y Y Y
ButtonHighlight Y Y Y Y Y
ButtonShadow Y Y Y Y Y
ButtonText Y Y Y Y Y
CaptionText Y Y Y Y Y
GrayText Y Y Y Y Y
Highlight Y Y Y Y Y
HighlightText Y Y Y Y Y
InactiveBorder Y Y Y Y Y
InactiveCaption Y Y Y Y Y
InactiveCaptionText Y Y Y Y Y
InfoBackground Y Y Y Y Y
InfoText Y Y Y Y Y
Menu Y Y Y Y Y
MenuText Y Y Y Y Y
Scrollbar Y Y Y Y Y
ThreeDDarkShadow Y Y Y Y Y
ThreeDFace Y Y Y Y Y
ThreeDHighlight Y Y Y Y Y
ThreeDLightShadow Y Y Y Y Y
ThreeDShadow Y Y Y Y Y
Window Y Y Y Y Y
WindowFrame Y Y Y Y Y
WindowText Y Y Y Y Y
Counter
(General) N N Y Y I
Integer
(General) Y Y Y Y Y
Length
(General) Y Y Y Y Y
em Y Y Y Y Y
ex Y Y Y Y Y
px Y Y Y Y Y
in Y Y Y Y Y
cm Y Y Y Y Y
mm Y Y Y Y Y
pt Y Y Y Y Y
pc Y Y Y Y Y
Number
(General) Y Y Y Y Y
Percentage
(General) Y Y Y Y Y
String
(General) N N Y Y Y
URI
(General) Y Y Y Y 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 IE 6 IE 7 Firefox 2 Firefox 3 Opera 9
!important
(General) I I Y Y 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 IE 6 IE 7 Firefox 2 Firefox 3 Opera 9
@charset
(General) I I Y Y Y
@import
(General) I I Y Y Y
@media
(General) I I Y Y Y
@page
(General) N N N N Y
:left N N N N Y
:right N N N N Y
:first N N N N Y

CSS 2.1 Basic selectors

Up

Selectors specify where CSS rules are applied on the document.

CSS 2.1 Basic selectors
Feature IE 6 IE 7 Firefox 2 Firefox 3 Opera 9
*
(General) I I Y Y I
E
(General) I I Y Y Y
E F
(General) I I Y Y Y
E > F
(General) N I Y Y Y
E + F
(General) N I Y Y I
[attr]
(General) N I Y Y Y
[attr="value"]
(General) N I I I I
[attr~="value"]
(General) N I I I I
[attr|="value"]
(General) N I I I I
.class
(General) I Y Y Y Y
#id
(General) I Y Y Y Y

CSS 2.1 Pseudo-classes

Up

Pseudo-classes select elements in certain special states.

CSS 2.1 Pseudo-classes
Feature IE 6 IE 7 Firefox 2 Firefox 3 Opera 9
:active
(General) I I Y Y Y
:first-child
(General) N I I Y I
:focus
(General) N N Y Y Y
:hover
(General) I I Y Y Y
:lang(C)
(General) N N Y Y Y
:link
(General) I I Y Y Y
:visited
(General) I I Y Y 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 IE 6 IE 7 Firefox 2 Firefox 3 Opera 9
:after
(General) N N I I I
:before
(General) N N I I I
:first-letter
(General) I I I I I
:first-line
(General) I I Y Y 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 IE 6 IE 7 Firefox 2 Firefox 3 Opera 9
background
(General) I I Y Y I
(background-color) 83% 83% Y Y 82%
(background-image) 67% 67% Y Y 83%
(background-repeat) 90% 90% Y Y 90%
(background-attachment) 50% 67% Y Y 83%
(background-position) 50% 50% Y Y 94%
inherit N N Y Y Y
background-attachment
(General) I I Y Y I
scroll I I Y Y Y
fixed I Y Y Y Y
inherit N N Y Y Y
background-color
(General) I I Y Y I
(Color) 99% 99% Y Y 97%
transparent Y Y Y Y Y
inherit N N Y Y Y
background-image
(General) I I Y Y I
(URI) Y Y Y Y Y
none Y Y Y Y Y
inherit N N Y Y Y
background-position
(General) I I Y Y I
(Percentage) I I Y Y Y
(Length) I I Y Y Y
left I I Y Y Y
center (horizontal) I I Y Y Y
right I I Y Y Y
top I I Y Y Y
center (vertical) I I Y Y Y
bottom I I Y Y Y
inherit N N Y Y Y
background-repeat
(General) I I Y Y I
repeat Y Y Y Y Y
repeat-x Y Y Y Y Y
repeat-y Y Y Y Y Y
no-repeat Y Y Y Y Y
inherit N N Y Y Y
border
(General) I I Y Y Y
(border-width) 90% 90% Y Y Y
(border-style) 82% 82% Y Y Y
(border-top-color) 66% 83% Y Y 99%
inherit N N Y Y Y
border-bottom
(General) I I Y Y Y
(border-width) 90% 90% Y Y Y
(border-style) 82% 82% Y Y Y
(border-top-color) 66% 83% Y Y 99%
inherit N N Y Y Y
border-bottom-color
(General) I I Y Y Y
(Color) 99% 99% Y Y 97%
transparent I Y Y Y Y
inherit N N Y Y Y
border-bottom-style
(General) I I Y Y Y
none Y Y Y Y Y
hidden N N Y Y Y
dotted I I Y Y Y
dashed Y Y Y Y Y
solid Y Y Y Y Y
double Y Y Y Y Y
groove Y Y Y Y Y
ridge Y Y Y Y Y
inset Y Y Y Y Y
outset Y Y Y Y Y
inherit N N Y Y Y
border-bottom-width
(General) I I Y Y Y
thin Y Y Y Y Y
medium Y Y Y Y Y
thick Y Y Y Y Y
(Length) Y Y Y Y Y
inherit N N Y Y Y
border-collapse
(General) I I Y Y Y
collapse Y Y Y Y Y
separate I I Y Y Y
inherit N N Y Y Y
border-color
(General) I I Y Y Y
(Color) 99% 99% Y Y 97%
transparent I Y Y Y Y
inherit N N Y Y Y
border-left
(General) I I Y Y Y
(border-width) 90% 90% Y Y Y
(border-style) 82% 82% Y Y Y
(border-top-color) 66% 83% Y Y 99%
inherit N N Y Y Y
border-left-color
(General) I I Y Y Y
(Color) 99% 99% Y Y 97%
transparent I Y Y Y Y
inherit N N Y Y Y
border-left-style
(General) I I Y Y Y
none Y Y Y Y Y
hidden N N Y Y Y
dotted I I Y Y Y
dashed Y Y Y Y Y
solid Y Y Y Y Y
double Y Y Y Y Y
groove Y Y Y Y Y
ridge Y Y Y Y Y
inset Y Y Y Y Y
outset Y Y Y Y Y
inherit N N Y Y Y
border-left-width
(General) I I Y Y Y
thin Y Y Y Y Y
medium Y Y Y Y Y
thick Y Y Y Y Y
(Length) Y Y Y Y Y
inherit N N Y Y Y
border-right
(General) I I Y Y Y
(border-width) 90% 90% Y Y Y
(border-style) 82% 82% Y Y Y
(border-top-color) 66% 83% Y Y 99%
inherit N N Y Y Y
border-right-color
(General) I I Y Y Y
(Color) 99% 99% Y Y 97%
transparent I Y Y Y Y
inherit N N Y Y Y
border-right-style
(General) I I Y Y Y
none Y Y Y Y Y
hidden N N Y Y Y
dotted I I Y Y Y
dashed Y Y Y Y Y
solid Y Y Y Y Y
double Y Y Y Y Y
groove Y Y Y Y Y
ridge Y Y Y Y Y
inset Y Y Y Y Y
outset Y Y Y Y Y
inherit N N Y Y Y
border-right-width
(General) I I Y Y Y
thin Y Y Y Y Y
medium Y Y Y Y Y
thick Y Y Y Y Y
(Length) Y Y Y Y Y
inherit N N Y Y Y
border-spacing
(General) N N Y Y Y
(Length) N N Y Y Y
inherit N N Y Y Y
border-style
(General) I I Y Y Y
none Y Y Y Y Y
hidden N N Y Y Y
dotted I I Y Y Y
dashed Y Y Y Y Y
solid Y Y Y Y Y
double Y Y Y Y Y
groove Y Y Y Y Y
ridge Y Y Y Y Y
inset Y Y Y Y Y
outset Y Y Y Y Y
inherit N N Y Y Y