Forum Moderators: not2easy
How do you guys go about doing it? Do you just target all tags like p, h1, h2, h3, ul, ol, etc individually and then add a margin-top or something to it? Or are you wrapping it all in another div and applying the padding to that div to move it away from the actual wrapper or containing div?
I had been applying the padding/margins to my content and sidebar divs themselves to move them away from the outter container div but I hear this is not the best way to do that when they are floated because it causes problems with other browsers, which I have noticed.
Thanks.
[edited by: swa66 at 8:49 am (utc) on Feb. 7, 2009]
[edit reason] unintentional smiley [/edit]
To add whitespace again you have 2 choices: padding or margin as you indicate. The 2 differences that make me choose are:
- backgrounds: margins do not enlarge the background, while padding does
- collapsing: margins can collapse, and if you look at plain text with p, h1, h2 etc. that does make a lot of sense
As for problems in IE < 8 : that's what you got conditional comments for.