I try to add margin values on a div inside another div. All works fine except the top value, it seems to be ignored. But why?
What I expected:
<
Use padding-top:50px
for outer div. Something like this:
#outer {
width:500px;
height:200px;
background:#FFCCCC;
margin:50px auto 0 auto;
display:table;}
Note: padding will increase the size of your div. In this case if the size of your div is important, I mean if it must have a specific height. decrease the height by 50px.:
#outer {
width:500px;
height:150px;
background:#FFCCCC;
margin:50px auto 0 auto;
display:table;}