W3C home > Mailing lists > Public > www-style@w3.org > December 2000

Re: help: styling a column with :first-child?

From: Daniel Glazman <glazman@netscape.com>
Date: Thu, 07 Dec 2000 16:34:43 +0100
Message-ID: <3A2FAE13.9050306@netscape.com>
To: "Manos M. Batsis" <manosb@profile.gr>
CC: www-style@w3.org


Manos M. Batsis wrote:

> 
> Hallo,
> I'm trying to style every first TD in a table so I give:
> 
> table tr:first-child{text-align:left;}

This selects all tr in a table that are also the first child of
their parent element, ie of a tbody tfoot or thead. Not cells.

The effect you are looking for can be achieved with the following
selector :

   td:first-child, td:first-child { ... }

</Daniel>
-- 
Daniel Glazman        Netscape Communications          Composer Team
http://people.netscape.com/glazman   #AIM:glazou2000  +33 1 41975746
glazman@netscape.com              Act if you can, teach if you can't
Received on Thursday, 7 December 2000 10:34:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:06 GMT