Sent by Mario Ruggier on 29 November 2003 13:01
Thanks to both Jon and Jukka for the replies!
I have resorted to determining this on the server, at html generation
time, and then putting out a specific CSS class. While the JavaScript
solution may work well in many case (thanks for the func!), I try to
avoid using JS in general, as it always ends up being more trouble
than its worth. And so far I am using no JS on this site, so...
> Yes. No new CSS specification has been issued - and even if a new
> specification with new selector types were issued now, it would take
> many
> years before we could use them, if we extrapolate from the
> past of CSS implementation.
Yes, of course.
>> Are there any known workarounds?
>
> Take a different approach. There's always the clumsy approach of using
> (lots of) class attributes, but maybe there's a better way.
I am so far going with the clumsy approach ;)
>> My specific case at the moment is that in a nested list, I'd
>> like to style an LI differently if it contains a UL element.
>
> Depending on the structure of the markup as well as the desired
> styling,
> you might or might not be able to do that without resorting to mere
> classes. Maybe it would suffice to style the inner UL elements (e.g. as
> regards to margins), which can be referred to using normal contextual
> selectors.
I am already styling inner UL elements, but I need an extra distinction
in specific cases. I probably can achieve this by using normal
selectors,
and "recursive" properties (e.g. % something of parent...). I would need
a few hours of play to be able to tell though ;(
Cheers, mario
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/