Re: Interop issues regarding tables and css tables

On 6/12/14, 10:59 PM, Greg Whitworth wrote:
> An additional note, I find it odd that vertical-align default on a table cell in HTML is middle while on a CSS table cell it is baseline.

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

Received on Friday, 13 June 2014 15:18:46 UTC