Topics
HTML
CSS
JS
PHP
Ruby
Mobile
UX
Design
Store
Forums
Subscribe
Crumbtrail
SitePoint
Reference
CSS
CSS Concepts
(this page)
by Paul O’Brien and Tommy Olsson
CSS Concepts
This section of the reference provides brief introductions to key CSS concepts.
In this Section
What Is CSS?
General Syntax and Nomenclature
The Cascade, Specificity, and Inheritance
CSS Layout and Formatting
Workarounds, Filters, and Hacks
Differences Between HTML and XHTML
Previous / Next page
Previous
Next
User-contributed notes
Related Products
SitePoint CSS Reference » Learn CSS3 | Cheat Sheet | CSS Tutorial | Selectors | Properties Index
CSS Properties
Box Properties
Dimensions
height
min-height
max-height
width
min-width
max-width
Margins
margin-top
margin-right
margin-bottom
margin-left
margin
Padding
padding-top
padding-right
padding-bottom
padding-left
padding
Borders and Outlines
border-top-color
border-top-style
border-top-width
border-top
border-right-color
border-right-style
border-right-width
border-right
border-bottom-color
border-bottom-style
border-bottom-width
border-bottom
border-left-color
border-left-style
border-left-width
border-left
border-color
border-style
border-width
border
outline-color
outline-style
outline-width
outline
Layout Properties
display
position
float
clear
visibility
top
right
bottom
left
z-index
overflow
clip
List Properties
list-style-type
list-style-position
list-style-image
list-style
Table Properties
table-layout
border-collapse
border-spacing
empty-cells
caption-side
Color and Backgrounds
background-color
background-image
background-repeat
background-position
background-attachment
background
color
Typographical Properties
font-family
font-size
font-weight
font-style
font-variant
font
letter-spacing
word-spacing
line-height
text-align
text-decoration
text-indent
text-transform
text-shadow
vertical-align
white-space
direction
unicode-bidi
Generated Content
content
counter-increment
counter-reset
quotes
User Interface Properties
cursor
Paged Media Properties
page-break-before
page-break-inside
page-break-after
orphans
widows
Vendor-specific Properties
Mozilla Extensions
-moz-border-radius
-moz-box-sizing
The display Property Value: -moz-inline-box
Internet Explorer Extensions
zoom
filter
behavior
The expression Property Value
Alphabetic Property Index
CSS Selectors
Universal Selector
Element Type Selector
Class Selector
ID Selector
Attribute Selector
CSS3 Attribute Selectors
Selector Grouping
Combinators
Descendant Selector
Child Selector
Adjacent Sibling Selector
General Sibling Selector
Pseudo-classes
:link
:visited
:active
:hover
:focus
:first-child
:lang(C)
CSS3 Pseudo-classes
:nth-child(N)
:nth-last-child(N)
:nth-of-type(N)
:nth-last-of-type(N)
Understanding :nth-child Pseudo-class Expressions
:last-child
:first-of-type
:last-of-type
:only-child
:only-of-type
:root
:empty
:target
:enabled
:disabled
:checked Pseudo-class
:not(S)
Pseudo-elements
:first-letter
:first-line
:before
:after
::selection
CSS At-rules
@charset
@import
@media
@page
@font-face
@namespace
CSS Concepts
What Is CSS?
CSS Versions
Linking CSS to a Web Document
Media Queries
Standards Mode, Quirks Mode, and Doctype Sniffing
General Syntax and Nomenclature
Statements
At-rules
Rule Sets
Selectors
Declaration Blocks
Declarations, Properties, and Values
Keywords
Lengths and Units
Percentages
Colors
Numbers
Strings
URIs
Initial Values
Shorthand Properties
CSS Comments
CSS Identifiers
CSS Escape Notation
CSS Syntax Errors
The Cascade, Specificity, and Inheritance
The Cascade
!important Declarations
Specificity
Inheritance
The CSS Property Value inherit
CSS Layout and Formatting
The Viewport, the Page Box, and the Canvas
The CSS Box Model
Containing Block
Collapsing Margins
The Internet Explorer 5 Box Model
The Internet Explorer hasLayout Property
Formatting Concepts
Block Formatting
Inline Formatting
List Formatting
Table Formatting
Replaced Elements
Positioning
Relative Positioning
Absolute Positioning
Fixed Positioning
Stacking Contexts
Floating and Clearing
The Relationship Between display, position, and float
Workarounds, Filters, and Hacks
Internet Explorer Conditional Comments
Workarounds and Filters
CSS Hacks
Differences Between HTML and XHTML
MIME Types
Case Sensitivity
Optional Tags
Root Element Properties
CSS Examples
CSS Tools
CodeBurner