CSS Cheat Sheet
Quick and Fast Learn CSS Cheat Sheet References.
Fonts
font-familyfont-style
font-variant
font-weight
font-stretch
font-size
font-size-adjust
Text
text-aligntext-indent
text-decoration
text-shadow
word-spacing
letter-spacing
text-transform
white-space
Table
table-layoutborder-collapse
border-spacing
caption-side
empty-cells
speak-header
Outline
outlineoutline-width
outline-style
outline-color
Selectors
*
div
div *
.class
div
div *
.class
All Elements
<div>
Element within <div>
Elements of class
<div>
Element within <div>
Elements of class
div.class
#numid
div#numid
a[class]
a[class="x"]
#numid
div#numid
a[class]
a[class="x"]
<div> of class
Elements with ID "numid"
div with ID "numid"
<a> with class attribute
<a> when class is "x"
Elements with ID "numid"
div with ID "numid"
<a> with class attribute
<a> when class is "x"
Measurement Units
px - pixelsem - 1em to font size parent (same as 100%)
ex - Height of lowercase "a"
% - Percentage
cm - Centimeters
mm - Millimeters
CSS Syntax
/* CSS Comments */Selectors {
property: value;
}
@media type {
}
Layout Model
margin*
margin-top
margin-bottom
margin-left
margin-right
margin-top
margin-bottom
margin-left
margin-right
padding*
padding-top
padding-bottom
padding-left
padding-right
padding-top
padding-bottom
padding-left
padding-right
border*
border-top
border-bottom
border-left
border-right
border-top
border-bottom
border-left
border-right
border-style*
border-top-style
border-bottom-style
border-left-style
border-right
border-top-style
border-bottom-style
border-left-style
border-right
Positioning
displayposition
top
bottom
left
right
float
clear
z-index
direction
overflow
visibility
Dimensional
widthmax-width
min-width
height
max-height
min-height
List
list-style*list-style-type
list-style-image
list-style-position
Pseudo Class
:link:active
:hover
:visited
:lang
:first-child
:first-line
:first-letter
Media Type
allbraille
embossed
handheld
projection
screen
speech
try
tv