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

Re: vertical-align (5.4.4)

From: Jim King <jimk@mathtype.com>
Date: Mon, 16 Dec 1996 10:28:50 -0800
Message-Id: <2.2.32.19961216182850.009cf818@pop.mathtype.com>
To: "David Perrell" <davidp@earthlink.net>
Cc: "Hakon Lie" <howcome@w3.org>, <www-style@w3.org>, <dsr@w3.org>
>> <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.

Now that IS good!  As to the baseline, if there was a way to define one I
wouldn't need to be asking these questions!  I think the assumption I saw
everywhere in the CSS spec was that replaced items have a baseline value
equal to the bottom of the object.

You're assuming here that a replaced item can actually have a font-size.  Is
that true? It can't have a line-height currently.  If it could have a line
height, then I'd modify your example to be:

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

because the vertical-align percentage is based on the line-height, so we
need to define it. I guess I could surround the image with a <SPAN> as I did
at the top, but it would be nice if the thing were clean and self-contained. 

I still think we need the ability to specifiy other types of units in
vertical-align. In this particular case, I'd want to define it in terms of
'em', since that is how the height was defined.  If the % related to the
font-size or the object height David's example would be perfect, but it
doesn't right now.

Does anyone have a feeling as to why other units are NOT allowed in
vertical-align?
Jim King
Product Manager
jimk@mathtype.com

==================================================================
Design Science, Inc.            Sales:   sales@mathtype.com
4028 Broadway                   Support: support@mathtype.com
Long Beach, CA 90803            
USA                             World Wide Web: 
voice: 310-433-0685                 http://www.mathtype.com
fax: 310-433-6969
==================================================================
Received on Monday, 16 December 1996 13:30:48 GMT

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