Re: [suggestion] Allow DIV inside any element

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 UTC