|
Posted by Neredbojias on 05/28/07 05:49
On Sun, 27 May 2007 09:56:30 GMT JWL scribed:
> Hello
>
> Suppose I have a div containing headings and paragraphs, and I decide to
> add some margin or padding to the left side of the div to create some
> whitespace. My question is, in this situation, is there any reason
> whatsoever to choose padding over margin or vise versa?
One significant difference is that padding will "propagate" the background
of the div whereas margins will delimit it. Also, top and bottom margins
may merge into adjacent margins, a situation which does not occur with
padding. Thirdly, padding will allow for the placement of absolutely-
positioned elements (within the relative container) "over itself" so to
speak.
I'm sure there are other differences as well.
--
Neredbojias
He who laughs last sounds like an idiot.
Navigation:
[Reply to this message]
|