Two Quick CSS Tips That Will Keep You From Committing Suicide
May 26th, 2007 in Design Tips & Tutorials
by: Matthew Griffin
Having fought these battles and come very close to killing myself, I know how important these two tips are.
1. Padding is interpreted differently in IE than it is in Firefox. So in order to make sure your layout won’t break in one or the other, nest a div tag inside another div tag and give the inner div tag a margin. Now you have the same effect as padding.
2. Set “overflow: hidden” on all div tags that need to be a certain height. Otherwise IE will add some extra padding at the bottom of them and drive you out of your mind.
If you’ve just decided to make the switch from table-based layouts to all CSS or you’ve being doing CSS layouts for a little while now, these tips will help you keep your sanity.
- 0 Comments
- 1213 Views