You are on page 1of 1

CSS Shorthand Cheat Sheet

margin, padding, border-width, outline-width: specifying 4 parameters:


1un 2un 3un 4un
1un
border-color, outline-color: #xxx #xxx #xxx #xxx
or
border-style, outline-style: solid dotted dashed double

4un 2un specifying less than 4 parameters:


(one:)
1un (two:)
1un (three:)
1un

1un 1un 2un 2un 2un 2un


3un 1un 1un 3un

border, border-left, border-right, border-top, border-bottom:


default: medium none #xxx; (leave style out & it defaults to none,
(width) (style) (color) making the width zero!!!)

example: 3px solid #888;

default: disc outside none; (type becomes default when image not found!!!)
list-style: (type) (position) (image)

example: square outside url(‘star.png’);

default: white url(‘back.png’) repeat top left scroll;


background: (color) (image) (repeat) (position) (scroll)

example: black url(‘starrynight.png’) repeat bottom right fixed;

default: normal normal normal inherited-value/normal inherited-value;


font: (style) (variant) (weight) (size) (line-height) (family)

example: italic small-caps bold 1em/1.2em helvetica neue, helvetica, sans-serif;


(do not try this [ugly] example at home!)

pause: cue: colors:


example: pause: 1s; example: cue: url(‘sound.au’);
(one attribute sets both (one attribute sets both
#xxyyzz == #xyz
pause-before && pause-after!!!) cue-before && cue-after!!!)
copyright 2007 - edwardwelker.com

You might also like