W3C home > Mailing lists > Public > public-html@w3.org > April 2007

Re: [suggestion] Allow DIV inside any element

From: Dão Gottwald <dao@design-noir.de>
Date: Mon, 30 Apr 2007 13:00:02 +0200
Message-ID: <4635CC32.5010802@design-noir.de>
To: Kornel Lesinski <kornel@geekhood.net>
CC: schalk@alliedbridge.com, "public-html@w3.org" <public-html@w3.org>

Kornel Lesinski schrieb:
> 
> On Sun, 29 Apr 2007 22:49:47 +0100, Schalk Neethling 
> <schalk@alliedbridge.com> wrote:
> 
>> In this regard why not have classes to identify each dt or li?
>>
>> <dl>
>>         <dt class="dt-one">lorem</dt>
>>         <dd class="dt-one">ipsum</dd>
> 
> CSS3 already has selectors for this (:nth-of-type/:nth-child).

:nth-of-type alone doesn't help to select the definitions that belong to 
a term. This would work:

   <dl>
     <dt>lorem</dt>
     <dd>ipsum</dd>
     <dt>dolor</dt>
     <dd>sit</dd>
   </dl>

   dt:first-of-type ~ dd {
     color: green;
   }
   dt:first-of-type ~ dt ~ dd {
     color: inherit;
   }

Far from ideal.

--Dao
Received on Monday, 30 April 2007 11:00:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:15:53 GMT