Posts Tagged ‘shorthand’

CSS shorthand techniques very useful

Posted by jposwal on May 19th, 2009 under CSSTags: ,  • No Comments

css-shorthand-techniques-very-useful

Main advantages of using CSS is the large reduction in web page download time. Writing mulitple declarations and values in a single line of CSS code called CSS Shorthand Technique.
1.Backgrounds
Background properties include background-color, background-image, background-repeat, background-position, You could write:
background-color: #ccc;
background-image: url(myimage.gif);
background-repeat: no-repeat;
background-position: top left;
Becomes:
background: url(myimage.gif) no-repeat top left;
2. Font
Font properties include several individual properties:
font-size:14px;
line-height:120%;
font-family:arial;
font-style:italic;
font-variant:small-caps;
font-weight:bold;
Can [...]