I've some questions about the following css.
.mainform{
margin:50px 20px;
background-color:#444;
width:100%;
height:80px;
}
.scontainer{
background-color:#999;
}
<div class="scontainer">
<div class="mainform">
TST
</div>
</div>
I've got the following result.
The the part of margin hasn't background color,even though the "scontainer" div wraped the "mainform" div.
Why doesn't the margin part of mainform have the background color, though the parent has background color?
Please help me.
Thanks.