Re: Image inside inline block

> Write or wrong?
> 
>    <span style="border: solid black">
>      Hello <img src="redbox.jpg" width="30" height="30" alt="MAIL"> world
>    </span>
> 
> As I understand CSS2 spec "red box" and surrounding it "Hello world" 
> should form "line box".

Yes.

> And as spec states "A line box is always tall enough for all of the 
> boxes it contains."

Yes.

> So I belive my red box should be inside black border.

This is making the logical leap that the line box is contained inside the
<span>.  If the <span> were block-level, that would be the case.  But it is in
fact a _inline_ element, so the box generated by the <span> goes inside the
line box, just like all inline boxes do.  The height of the span is computed
per http://www.w3.org/TR/CSS21/visudet.html#q15 and is just based on the font
used...

The question which then has to be asked is whether the image can be considered
to be a "very large" glyph in the font, I suppose.

Boris
-- 
Modern art is what happens when painters stop looking at girls and 
persuade themselves that they have a better idea.
                                          -- John Ciardi

Received on Friday, 10 January 2003 02:19:11 UTC