html - Why does putting a margin on one div move its container? -


i've container div has div inside it. when apply margin inner div appears margin-top container div (although doesn't give left margin)

http://belfastswimmingteacher.com/mockup.html

what's craic?

you can either float halfleft div, or add padding-top #content.

this known margin collapsing, , whilst may produce unwanted behaviour, in fact intended , correct.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -