RE: Interop issues regarding tables and css tables

> The default value of 'vertical-align' in CSS in general is baseline:
> http://www.w3.org/TR/CSS21/visudet.html#propdef-vertical-align says:
> 
>    Initial:  	baseline
> 
> In HTML, basically for backwards compat reasons with pre-CSS table
> rendering, the UA stylesheet has:
> 
>    thead, tbody, tfoot, table > tr { vertical-align: middle; }
>    tr, td, th { vertical-align: inherit; }
> 
> plus some bits that map "valign" attributes on certain table-related HTML
> elements to vertical-align styles.
> 
> So if you do:
> 
>    <tr valign="top">
> 
> and nothing else you will get vertical-align:top on all the cells in that row.  See
> http://www.whatwg.org/specs/web-apps/current-
> work/multipage/rendering.html#tables
> 
> -Boris

I had a feeling it was for backwards compat reasons, just don't like the inconsistencies :)
Thanks.

Greg

Received on Friday, 13 June 2014 16:06:59 UTC