Author Topic: Dumb CSS Q  (Read 584 times)

0 Members and 1 Guest are viewing this topic.

GilloD

  • TAKE THE LIFE OF FRED ASTAIRE. MAKE HIM PAY. TRANSFER HIS FAME TO YOU.
  • Senior Member
Dumb CSS Q
« 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.
wha

demi

  • cooler than willco
  • Administrator
Re: Dumb CSS Q
« Reply #1 on: February 18, 2009, 04:26:58 PM »
Padding - inside

Margin - outside
fat

GilloD

  • TAKE THE LIFE OF FRED ASTAIRE. MAKE HIM PAY. TRANSFER HIS FAME TO YOU.
  • Senior Member
Re: Dumb CSS Q
« Reply #2 on: February 18, 2009, 04:46:43 PM »
I am distinguished mentally-challenged and that doesn't 100% make sense.
wha

Tauntaun

  • I'm cute, you should be too.
  • Senior Member
Re: Dumb CSS Q
« Reply #3 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
:)

demi

  • cooler than willco
  • Administrator
Re: Dumb CSS Q
« Reply #4 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)
fat

GilloD

  • TAKE THE LIFE OF FRED ASTAIRE. MAKE HIM PAY. TRANSFER HIS FAME TO YOU.
  • Senior Member
Re: Dumb CSS Q
« Reply #5 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!
wha