CSS Cheat Sheet

SELECTORS
.classSelects all elements with class="class"
#idSelects all elements with id="id"
*Selects all elements
div pSelects all p elements inside div elements
div>pSelects all p elements that are direct children of div elements
[target]Selects all elements that have a target attribute
[target="_blank"]Selects all elements that have a target attribute set to "_blank"
:first-childSelects every p element that is the first child of its parent (p:first-child). Also includes :last-child.
:first-of-typeSelects the first element of a certain type (p:first-of-type). Also includes :last-of-type.
:hoverSelects all elements that are being hovered over.
ESSENTIALS
backgroundbackground-image, -position, -size, -repeat, -attachment, -origin, -clip, -color
borderborder-width, -style, -color
marginmargin-top, -right, -bottom, -left
paddingpadding-top, -right, -bottom, -left
displayblock | inline-block | inline | none
widthauto | % | length
heightpx | % | em | auto
font-familyfamily-name, generic-family, inherit
font-sizepx | % | em | inherit
colorHEX | inherit
opacitydecimal | inherit
positionstatic | absolute | relative
floatleft | right | none
z-indexauto | integer