I've been developing websites for 3 years now and today found something which I couldn't understand. The code I am working with: http://pastie.org/1439629
<!DOCTYPE html>
<head>
 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
 <title>Page Title</title>
 <style type="text/css" media="screen">
  .box{
   margin:50px 0;
   background:red;
   border:1px solid black;
  }
 </style>
</head>
<body>
 <div class="box">
  Y
 </div>
 <div class="box">
  X
 </div>
</body>
Now the issue is, I cant figure out why the two Divs with the class BOX are sharing the same margin space. i.e. the bottom margin on Y is same as top margin of X. Shouldn't there be 100pixel space between the two instead of 50px?
Edit: If i edit CSS to
.box{
    margin:50px;
    background:red;
    border:1px solid black;
    float:left;
    height:50px;
    width:50px;
}
then the distance between the two should still be 50px, but no! now its 100pixel. Why?
Sorry for such a trivial question but i couldn't figure out.