I have the following structure:

<body class="foo">
<div class="main">
<div class="constrained"></div>
<div class="two"><div class="constrained"></div></div>
<div class="two"><div class="constrained"></div></div>
<div class="two"><div class="constrained"></div></div>
<div class="constrained"></div>
</div>
</body>

and these styles:
.foo .main .constrained:first-of-type{padding-bottom:0;}
.foo .main .two:first-of-type{padding-top:0;}

the second rule doesn't work. Doesn't even show in the Chrome inspector.
Not even as being over-written by something. However, this rule does work:
.foo .main .constrained + .two{padding-top:0;}

Is there an issue with having 2 :first-of-type rules like that?
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to