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

Re: Interop issues regarding tables and css tables

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 13 Jun 2014 11:18:17 -0400
Message-ID: <539B1639.3050600@mit.edu>
To: Greg Whitworth <gwhit@microsoft.com>
CC: "www-style@w3.org" <www-style@w3.org>
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 

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

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