See this jsfiddle for example:
http://jsfiddle.net/FrJRA/1/
and note that the inner span’s border overlaps the containing div.
I sort of understand what is happening. But I don’t understand why. Why isn’t the size of the div increased to allow for the new height of the span?
I know I can use display: inline-block if I want this to happen, but what is the reasoning behind inline failing to increase parent container size?
Inline elements only change their dimensions for padding in the left/right dimensions. It doesn’t increase the dimension of the element in the top/bottom directions. That’s why you notice it increasing it on the sides but not on the top/bottom.
Update:
Found the part of the W3 specification that touches on this.