W3C home > Mailing lists > Public > www-style@w3.org > December 1996

Re: vertical-align (5.4.4)

From: David Perrell <davidp@earthlink.net>
Date: Fri, 13 Dec 1996 17:09:49 -0800
Message-Id: <199612140117.RAA19989@armenia.it.earthlink.net>
To: "Jim King" <jimk@mathtype.com>
Cc: "Hakon Lie" <howcome@w3.org>, <www-style@w3.org>, <dsr@w3.org>
Jim King wrote:
> <P>This is a sentence with an inline equation: 
>   <SPAN STYLE="line-height: 12">
>     <IMG STYLE="vertical-align: -25%" SRC="equation.gif">
>   </SPAN>
> </P>
> 
> would shift the equation down by 3 points.  The only problem is that
the
> height of objects themselves are usually defined relative to the
canvas...

Actually, I suggested a line height in pixels, to conform with the
pixel measure of bitmaps. As for your markup producing a 3 point drop,
I don't think so, as you haven't specified line-height as '12pt'. 'px'
is pixel measure, but I wonder how UAs are supposed to treat values
without units. I assumed pixels, since that's default in HTML.

> <P>This is an inline equation:
>   <IMG STYLE="height: 120px; width: 300px; vertical-align: -45px"
>        SRC="equation.gif">
> </P>

Yes, this is much cleaner.

Replaced elements have no baseline by default. Can they be given one?

  <P>This is an inline equation:
    <IMG STYLE="font-size: 100%;
                height: 4em; width: 10em;
                vertical-align: -5%"
         SRC="equation.gif">
  </P>

If so, the above would produce a graphic that is both sized and
vertically-aligned relative to the parent's font.

David Perrell
Received on Friday, 13 December 1996 20:25:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:46 GMT