Some shorthand css properties

by Vijay 2010-01-29 19:39:54


Background

background-color: color || #hex || (rgb / % || 0-255);
background-image:url(URI);
background-repeat: repeat || repeat-x || repeat-y || no-repeat;
background-position: X Y || (top||bottom||center) (left||right||center);
background-attachment: scroll || fixed;


can be minimized as,

background:#fff url(image.png) no-repeat 20px 100px fixed;


Font

font-weight: bold;
font-style: italic;
font-variant: small-caps;
font-size: 1em;
line-height: 1.5em;
font-family: verdana,sans-serif


can be minimized as,

font: bold italic small-caps 1em/1.5em verdana,sans-serif;


Border

border-width: 4px;
border-style: groove;
border-color: linen;


can be minimized as,

border:4px groove linen;



Tagged in:

616
like
0
dislike
0
mail
flag

You must LOGIN to add comments