Discussion: Font sizes are wrong
Afficher un message
Vieux 09/03/2008, 22h48   #9
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Font sizes are wrong

On 2008-03-09, Jukka K. Korpela <jkorpela@cs.tut.fi> wrote:
[...]
> And I don't quite see how you get such results. If I set vertical-align:
> top for a TR element, then the cells within the row become top-aligned,
> unless some style sheet explicitly overrides that. I regard this is a
> bug, since by definition, vertical-align is not inherited.


It is when it's set to inherit, and it often is set to that in the
default stylesheet.

> Moreover, even if it were defined as inherited, it should not get
> inherited into table cells, since TH and TD elements have, in
> practice, vertical-align: middle in browser default style sheets.


Appendix D of CSS 2.1 has

td, th { vertical-align: inherit }

They say this is based on extensive research into current UA practice.

> If I try the following on IE 7 or Firefox 2, "foo" gets top aligned:
>
><table border="1"><tr style="vertical-align:bottom"><td>
> hello<br>world</td>
><td>foo</td> </tr> </table>
>
> By the specs, as I read them, it should be middle aligned.


Not if td { vertical-align: inherit }. It's not a bug.
  Réponse avec citation
 
Page generated in 0,05968 seconds with 9 queries