I am introducing a series of CSS tricks that I have learned over the past couple of years. Many of these techniques, in fact most, were not created by me, however I use them almost every day. Hopefully, every couple of days, I will share another CSS rule or set of rules that I use regularly to help me through the day.
For today, I’ll keep it simple:
Zero-ing or defaulting out tags:
I put this CSS declaration in every project I start. It’s basically a way of blanking out your canvas before you start. This technique extends beyond the html and body tags and into every kind of tag. For instance, if you don’t know how a browser displays a UL or an OL, you may want to zero out the margin and padding to know what you are working with. The idea is that not all browsers display HTML elements in the same manner.
Check back soon for another set of common tricks in CSS I use.