5 Tips and Tricks How to Optimize Your Css
In this article we will find that how to optimize Css.This is very simple and basic tips for the web designers and developers. Not only will these tips help reduce the file size of your CSS file, but they’ll also speed up your coding if you prefer to do some of your CSS by hand.
1. Use CSS Shorthand
BeforeAfterp {
margin-top: 5px;
margin-right: 10px;
margin-bottom: 15px;
margin-left: 20px;
}p{ margin:5px 10px 15px 20px;}
2. Remove Unnecessary Whitespace
BeforeAfter.wrap
{
width:900px;
height:100%;
margin:0px;
padding:0px;
background-color:#cccccc;
}.wrap
{ width:900px; height:100%; margin:0px; padding:0px;}
3. Use shorthand colors
Longhand hex colors are specified as three red, green, and blue triplets, like this:
You can abbreviate colors that have an identical value for each pair, that is, #rrggbb;, with only one value per pair, so this:
becomes this, using shorthand hex notation:
Named colors can ease maintenance, but they are generally longer than their shorthand hex equivalents (other than red and tan).
4. Use Descendant Selectors
5. Use Css CompressTools
if you don’t want to waste your time in modifying your old style sheets you can simply use online css compress tools, it make your work in seconds
check this online css compress tools…
Css Tidy
Clean Css
Css Optimiser
Flumpcakes Css optimizer
cssdrive Css Comperasor
W3C Css Validator
Related Articles:
if you enjoyed reading this article, please check out other related articles below:











Loading...










































Submit a Comment