Search

9/16/2008

10 Principles of the CSS Masters - NETTUTS

10 Principles of the CSS Masters - NETTUTS
2. Keep CSS declarations in one line - Jonathan Snook -
2800852816_b417cc7fe6_b
4. Allow block elements to fill space naturally - Jonathan Snook

My rule of thumb is, if I set a width, I don't set margin or padding. Likewise, if I'm setting a margin or padding, I don't set a width. Dealing with the box model can be such a pain, especially if you're dealing with percentages. Therefore, I set the width on the containers and then set margin and padding on the elements within them. Everything usually turns out swimmingly.

沒有留言: