Simplify your stylesheets.
Start your CSS files with the asterisk(*) selector. The asterisk selector selects all html elements. You can easily set the default styles you want for all elements.
For example:
* {
margin:0;
padding:0;
}
I have found that using this method decreases time spent fixing browser inconstancies. It can also decrease lines of code if you find yourself applying the same attributes to every element. However, due to the Cascading nature of CSS you can easily later change these attributes for those elements that differ.
Written by Patrick Murphy
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Related Tags
#css
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#