3 replies [Last post]
roscoe
roscoe's picture
Offline
Enthusiast
Last seen: 12 years 43 weeks ago
Joined: 2006-03-09
Posts: 138
Points: 0

html: http://roscoecreations.com/exitpro/
css: http://roscoecreations.com/exitpro/css/style.css

I was curious about this. If you check out my page you will see that the h1 "ExitPro main features:" top margin is moving down the flash div 10px from the top instead of just moving itself down 10px. Now I know I can fix this by changing the top margin from 10px to the top padding to 10px but I thought margins were supposed to move the elements around and padding was supposed to move the information in the element around inside of it. What exactly is occurring?

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 2 years 27 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Welcome to the world of

Welcome to the world of collapsing margins Smile and how to fix it:

Uncollapsing Margins

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 7 years 10 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

read up on collapsing

read up on collapsing margins. This is correct behavior. You could add a 1px padding or border to the #flash and then the h1 margin would start from there.

edit/ man, that CT is quick Wink

roscoe
roscoe's picture
Offline
Enthusiast
Last seen: 12 years 43 weeks ago
Joined: 2006-03-09
Posts: 138
Points: 0

Thanks for the help.

Got it. Thanks for that link and all the help.