Re: Rendering: default style for <figure>

On Fri, Feb 6, 2009 at 2:46 PM, Simon Pieters <simonp@opera.com> wrote:
> I thought the following rules would do what I want:
>
>  figure { display:table; margin-left:40px; margin-right:40px }
>  figure > legend { display:table-caption; caption-side:bottom }
>  figure > legend:first-child { caption-side:top }
>
> But the :first-child matches in this case which is not expected:
[CUT]

Wouldn't CSS3 first-of-type [1] do the trick ?

[1] http://www.w3.org/TR/css3-selectors/#first-of-type-pseudo

-- 
Olivier G.
http://www.lespacedunmatin.info/blog/

Received on Friday, 6 February 2009 17:07:03 UTC