Archive for August, 2007

CSS Shorthand Properties

Wednesday, August 15th, 2007 By Nikhil

Eg.
Specifying a CSS property like this,

margin:5px 0;

actually means,

margin:5px 0px 5px 0px;

That first margin property means:

top and bottom margin = 5px ¦¦ left and right margin = 0px

so the ‘longer shorthand’ would be

margin:5px 0px 5px 0px; (T, R, B, L)

you could even use 3 values

margin: 5px 0 5px;

which means

top = 5px ¦¦ right and left = 0px ¦¦ bottom = 5px


get ExpressingIT News by Email Subscribe to ExpressingIT by Email or  Follow Me on Twitter


 Subscribe to ExpressingIT RSS
get ExpressingIT News by Email Subscribe to ExpressingIT by Email
 Follow Me on Twitter