Css Cheat Sheet: Shorthand
Css Cheat Sheet: Shorthand
SYNTAX
BOX MODEL
height; w idth; margin-top; margin-right; margin-bottom; margin-left; padding-top; padding-right; paddingbottom; padding-left;
Comments
/* Comment */
BORDER
Width of the border
dashed; dotted; double; groove; inset; outset; ridge; solid; none
Pseudo Selectors
:hover :active :focus :link :visited :first-line :first-letter
GENERAL
Class ID div span color cursor display String preceded by a period String preceded by a hash mark Formats structure or block of text Inline formatting Foreground color Appearance of the cursor
block; inline; list-item; none
POSITION
clear float left top Any floating elements around the element?
both, left, right, none
Media Types
all braille embossed handheld print projection screen speech tty tv
visibility
visible, hidden
FONT
font-style Italic, normal fontvariant fontw eight
normal, small-caps bold, normal, lighter, bolder, integer (100-900)
position static, relative, absolute z-index Element above or below overlapping elements?
auto, integer (higher numbers on top)
BACKGROUND
background-color background-image background-repeat backgroundattachment background-position Background color Background image
repeat, no-repeat, repeat-x, repeat-y
Units
Length % em pt px Keyw ords bolder lighter larger
TEXT
letterspacing line-height text-align textdecoration text-indent texttransform verticalalign w ordSpace betw een letters Vertical distance betw een baselines Horizontal alignment
blink, line-through, none, overline, underline
LIST
list-style- Type of bullet or numbering in the list type disc; circle; square; decimal; lower-roman; upperroman; lower-alpha; upper-alpha; none
list-style- Position of the bullet or number in a list position inside; outside list-style- Image to be used as the bullet in a list image
lesliefranke.com/files/reference/csscheatsheet.html
1/2
11/02/13
spacing
* The properties for each selector are in the order they should appear when using shorthand notation.
lesliefranke.com/files/reference/csscheatsheet.html
2/2