Chang Huang wrote:

> I've forgotten to mention that the list is
> dynamically generated, sorry, so it's not possible to predict the last
> 'special' item.

Then the generating process should be modified so that it becomes possible 
to mark the last 'special' item. Typically it would just have to keep a <ul> 
element in a buffer and keep track of the last 'special' item, then, when 
that element is to be ended, emit the markup so that the last 'special' item 
has, say,

<li class="special last">ggg</li>

and you could then use a selector like
li.special.last

> I also tried "li[class='special']:last-child" with no success.

It cannot help, as the components of a selector don't interact the way that 
would be needed for that to work. The selector li refers to all <li> 
elements. The selector [class='special'] refers to all elements in class 
'special'. And the selector :last-child refers to any element that is the 
last child of its parent. Putting those selectors together means just 
creating a reference to those elements that match each of the selectors.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

______________________________________________________________________
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