W3C home > Mailing lists > Public > www-style@w3.org > June 2014

RE: Interop issues regarding tables and css tables

From: Greg Whitworth <gwhit@microsoft.com>
Date: Fri, 13 Jun 2014 16:06:28 +0000
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <6bdfcd54f2d944e0a18d250a81fcafc2@DM2PR03MB400.namprd03.prod.outlook.com>
> 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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:22 UTC