I have following mark up:
<div class="one">Content</div>
<div class="two"></div>
and following style sheets:
.one, .two {
height: 20px;
}
.one {
background-color: #f00;
}
.two {
background-color: #0f0;
margin-top: -10px;
}
Why is the text Content
visible, but the red background is not? I would expect the text also to be only partly visible due to the given style sheets.
For your convenience, I also created a jsFiddle.