Here is the source:
<div style="border:1px solid red; margin-bottom:10px">test block1,</div>;
<div style="border:1px solid red; margin-top:10px">test block2</div>;
It always has 10px between block1 and block2…
I’m not sure what is wrong. Please don’t say ‘use padding‘ and ‘change 20px‘
I have to use margin-bottom, margin-top and only 10px.
It’s called collapsing margin
as per w3c
Read this http://reference.sitepoint.com/css/collapsingmargins