Previous Message
Next Message

Re: [css-d] vertical align and doctype

Sent by Rijk van Geijtenbeek on 28 January 2002 17:05

On Monday, January 28, 2002, Peter-Paul wrote:

>>I'm trying to make this work in IE
>>.mid {vertical-align:middle}
>><tr class="mid">
>>Works fine until I add the doctype for transitional 4.01. What wrong?

PPK> This is without a doubt one of the most annoying things about CSS: it's 
PPK> simply not possible to vertical-align something. As far as I can remember 
PPK> this is a feature, not a bug. But I have no idea why this is so.

PPK> As far as I can remember vertical-align should work only on inline elements 
PPK> (or pure text nodes) inside something (block level in general? Only DIV's? 
PPK> Can't remember). In any case the rules were very complex for no good reason. 
PPK> Could anyone explain, especially the rationale (or lack of it) behind this 
PPK> decision?

The 'vertical-align' property in CSS1 is solely related to the
positioning of boxes *inside* the inline box, when the different boxes
are not of the same height. This can happen when one word in a line
has a bigger font, or when inline non-floated images are used.

For CSS2, the semantics for 'vertical-align' were changed, and now it
can be used as a replacement for the valign attribute on table cells
(but not on rows).

 Rijk                            [EMAIL-REMOVED]

Mot du Jour:
When in doubt, think.
Previous Message
Next Message

Message thread:

Possibly related: