W3C home > Mailing lists > Public > public-html@w3.org > February 2009

Re: Rendering: default style for <figure>

From: Olivier GENDRIN <olivier.gendrin@gmail.com>
Date: Fri, 6 Feb 2009 18:06:28 +0100
Message-ID: <e2c275120902060906x4bc9d9faqf997ed04e89ea023@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: public-html <public-html@w3.org>

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

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:01 UTC