THE BORE

General => The Superdeep Borehole => Topic started by: GilloD on February 18, 2009, 04:25:56 PM

Title: Dumb CSS Q
Post by: GilloD on February 18, 2009, 04:25:56 PM
What's the diff between margin and padding? I assumed it was that margin ADDED pixels to the element while padding merely consumed any leftover space inside the either the element or the nearest ancestor. But generally I'm not sure.
Title: Re: Dumb CSS Q
Post by: demi on February 18, 2009, 04:26:58 PM
Padding - inside

Margin - outside
Title: Re: Dumb CSS Q
Post by: GilloD on February 18, 2009, 04:46:43 PM
I am distinguished mentally-challenged and that doesn't 100% make sense.
Title: Re: Dumb CSS Q
Post by: Tauntaun on February 18, 2009, 04:59:53 PM
I thought for a brief second that this was a counter-strike source thread then I remembered which forum I was in.   :'(

:gun
Title: Re: Dumb CSS Q
Post by: demi on February 18, 2009, 05:02:38 PM
I am distinguished mentally-challenged and that doesn't 100% make sense.

Here is a box

When I use padding, it puts packing peanuts on the inside

PADDINGPADDINGPADDINGPADDINGPADDING
I am distinguished mentally-challenged and that doesn't 100% make sense.
PADDINGPADDINGPADDINGPADDINGPADDING

When I use margin, I put packing peanuts on the outside

MARGINMARGINMARGINMARGIN
I am distinguished mentally-challenged and that doesn't 100% make sense.
MARGINMARGINMARGINMARGIN


It's mostly used when dealing with DIV containers, and often used to even out the niggles that FireFox/IE deal with (ie WHY WONT THEY BOTH BE CENTERED OMFG)
Title: Re: Dumb CSS Q
Post by: GilloD on February 18, 2009, 05:11:25 PM
I thought for a brief second that this was a counter-strike source thread then I remembered which forum I was in.   :'(

:gun

Haha. You say this everytime I post a CSS thread. Let's hnag out again.

And Tanks, Demi. Makes sense!