Re: margin vs. padding

Francisco Brandão wrote:
> 
> i would like to know what´s the real big difference (if there is anyone)
> between the use of margin and padding properties to adjust and control the
> distance between the contents of a page and the surroundings
> top|bottom|left|right margins of the browser area.
> i've tested with both properties on IE5, NS4 and NS6 and it seems to work
> all in the same way ....

Try adding a border and then look. :)
The padding comes between the border and the content; margins
go outside the border.

> is there any preference for one of them on the Body tag in CSS ??

I think padding makes more sense, but I don't know what's preferred.

Received on Wednesday, 17 January 2001 20:10:50 UTC