W3C home > Mailing lists > Public > www-style@w3.org > January 2003

Re: Image inside inline block

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 10 Jan 2003 02:19:09 -0500
Message-Id: <200301100719.CAA16036@no-knife.mit.edu>
To: Vasiliy Gagin <vasiliy@gazooc.com>
cc: www-style@w3.org

> 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".


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


> 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

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.

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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:05 UTC