Css Cheat Sheet: Shorthand
Css Cheat Sheet: Shorthand
SYNTAX
BOX MODEL
height; width; margin-top; margin-right; margin-bottom; margin-left; paddingtop; padding-right; padding-bottom; padding-left;
Comments
/* Comment */
BORDER
borderwidth Width of the border
GENERAL
Pseudo Selectors
:hover :active :focus :link :visited :first-line :first-letter
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
bordercolor
POSITION
clear float left 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
font-variant normal, small-caps font-weight bold, normal, lighter, bolder, integer (100-900) font-size Size of the font
BACKGROUND
Background color Background image
repeat, no-repeat, repeat-x, repeat-y
TEXT
Units
Length % em pt px Keywords bolder lighter larger
background-image background-repeat
text-decoration blink, line-through, none, overline, underline text-indent text-transform vertical-align word-spacing First line indentation
capitalize, lowercase, uppercase
background-position
LIST
list-styletype list-styleposition list-styleimage Type of bullet or numbering in the list
disc; circle; square; decimal; lower-roman; upper-roman; lower-alpha; upper-alpha; none
* The properties for each selector are in the order they should appear when using shorthand notation.
http://lesliefranke.com/files/reference/csscheatsheet.html[20.01.2013 10:39:31]