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

Re: [suggestion] Allow DIV inside any element

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 30 Apr 2007 21:10:45 +1000
To: "public-html@w3.org" <public-html@w3.org>
Message-ID: <20070430111045.GB23465@arc.mcc.id.au>

Dão Gottwald:
> :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.

Also, I was imagining that it would facilitate certain kinds of styling,
such as putting a border around each dt/dd pair:

  +---------------+
  | lorem         |
  |   ipsum       |
  +---------------+
  +---------------+
  | dolor         |
  |   sit         |
  +---------------+

Is that possible with CSS3 Selectors?  (I think it isn’t, but I’m not
that familiar with Selectors).

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au
Received on Monday, 30 April 2007 11:10:44 GMT

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