Jul 1, 2007
Maxwell’s Silver Hammer
Tired of debugging every bit of CSS sweet code you write? Are a control freak that came from print or letterpress or worse? You don’t mind declaring everything that needs to be declared? Bring on the hammer. Maxwell’s Silver Hammer.
I got tired of making my designs work because some dumbass browser was automatically shoving a few spare pixels of space here and there. I’m a typographer. I love type. I try to do it right. I don’t want some silly default mucking it up.
Start off your css with this:
*{
margin:0;
padding:0;
}
That will eliminate all margins and paddings. This means everything you don’t explicitly declare as without padding and margins (“Bang baaaang”). From now on you won’t have to mess around with default craptastic settings of browsers or what-have-you. And you’ll be allowed the freedom/burden of declaring everything yourself.
I originally came across this idea while looking for some fine fine Joomla info.
Enjoy. Don’t use if you aren’t a typographic nut-job like myself.