Linda H wrote:
There are times when you can get a desired result using either padding or margins. Is there any reason why one or the other is better?
Often they are interchangeable, however, there are some significant differences:
1. Padding will have the background of the element on which it is set; margins are transparent and so will usually have the background of the parent element.
2. Padding is included in the box width in some older browsers and IE6 in "quirks" mode; margins never are.
3. Margins can collapse; padding never does.
There may be other differences, too, but those are the ones that occur to me off the top of my head.
[1] <http://www.w3.org/TR/CSS21/colors.html#q2> [2] <http://www.communitymx.com/content/article.cfm?cid=E0989953B6F20B41> [3] <http://www.w3.org/TR/CSS21/box.html#collapsing-margins>
HTH,
--
-Adam Kuehn ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/