On Mar 30, 2009, at 3:55 PM, Charles wrote:

> I understand your rationale. Now, what if, among the list items that
> have a "new" class, I want to select the second item? Please note in
> my case there may be a variable number of list items before those that
> have a "new" class, however, there is always the same number of list
> items that have the class "new". So I can only start counting only
> from the first item of those marked with the class "new", and I want
> to pick the second item. How can I do that?

Hmm, if the li.new are next to each other (adjacent), this works:
li:not([class="new"])+li.new+li.new {border:2px solid red;}

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [[email protected]]
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