pretty, draggable cloud pretty, draggable cloud pretty, draggable cloud pretty, draggable cloud pretty, draggable cloud pretty, draggable cloud pretty, draggable nick

Archive for November 2008

Resetting CSS style sheets

While I digest what’s left of the turkey and stuffing I ate over the weekend, I want to remind myself (and other Web developers) of something to be grateful for: CSS reset frameworks. These wonderful style sheets override built-in browser preferences to start you off with a fresh palette to textually paint your new Web site. All browser-specified margins, padding, sizes, indents, etc. are gone.

The sheets come in a variety flavors, many inspired by CSS master Eric Meyer. Yahoo provides developers a sheet to link directly to. (You can also steal the source to build your own.)

Your preferences may vary. But to start building pixel-perfect layouts — even in Internet Explorer — these frameworks are a great start. You will be surprised by how many styles are affected, and how you let browsers dictate how your site’s tags look. I use a very basic version of this on NickGehring.com, just setting all margins and padding to 0 with an asterisk.

* {
margin: 0;
padding: 0;
}

Yahoo and other frameworks get much more sophisticated with their approaches. It all depends on your needs.