I have two questions:
- Why does padding on inline elements work I have read that padding on inline element should not work.
- Why does the padding push the span above the div container:
http://jsfiddle.net/L76e208g/1/
body > div {
width: 150px;
height: 150px;
background: black;
margin-top: 40px;
display: inline-block;
vertical-align: bottom;
}
div > div,
div > span{
border-radius: 5px;
padding: 10%;
background: red;
}
<div>
<div>
</div>
</div>
<div>
<span>
</span>
</div>