我的父容器内的div应该从容器的顶部开始有20px的边距,而边缘顶部应用于父容器......
#rules-panel {
background-color:blue;
width:80%;
margin:0 auto;
height:800px;
}
#rules-panel .box {
margin:20px;
margin-top:20px; /* why isn't the margin working */
background-color:red;
}

<div id="rules-panel">
<div class="box">
<p>THIS IS div</p>
<p>THIS IS div</p>
<p>THIS IS div</p>
<p>THIS IS div</p>
<p>THIS IS div</p>
</div>
</div>
&#13;