How does CSS margin work?
css, html
Solution
No, the margin will only be 10px between the 2 boxes.
You are saying the same thing twice , "that there must be a margin of 10px below box 1" and "that there must be a margin of 10px above box2"
Think of it like this :
There are 2 people, Harry and Sally. Harry is standing 10 feet from Sally. How far is Sally away from Harry? Yep, you got it, 10 feet!
Problem
In the following code, shouldn't the margin between `.box1` and `.box2` be 20px as the `.box1` has 10px bottom margin and `.box2` has 10px top margin. ``` <div class="box"> <div class="box1"></div> <div class="box2"></div> </div> ``` CSS: ``` .box1{ margin-bottom: 10px; } .box2{ margin-top: 10px; } ``` http://jsfiddle.net/3C7bW/