I’m curious about how the size of a parent inline element is determined.
Actually, I read this docs1 and this docs2 before asking about this.
To be honest, I didn’t understand it exactly.
It seems that the height of an inline element is determined by the linebox.
But please look at the following simple code.
<span>
<img src="00f.jpg">
</span>
Here, the size of the image is 450x500
. Therefore, the size of the img element
is also 450×500.
And I expected the size of the span to be 450×500 as well.
Because the size of the linebox that wraps the img element inside the <span>
is 450×500.
But the result is roughly 450x21
.
Isn’t the size of the parent inline element determined by the size of its child element?
What am I missing?