Use Shorthand CSS

Posted in CSS by Admin Parashu | Tags:

Shorthand CSS gives you a shorter way of writing your CSS codes, and most important of all – it makes the code clearner and easier to understand for everyone.

Instead of creating CSS like this

.header {
background-color: #fff;
background-image: url(yourimage.gif);
background-repeat: no-repeat;
background-position: top left;
}

It can be short-handed into the following:

.header {
background: #fff url(yourimage.gif) no-repeat top left
}

Try to reduce the size of css file using shorthand css.