[themes] Highlighting active leaf in book navigation.
Mark Hope
mark at markhope.net
Thu Jun 28 20:43:58 UTC 2007
On 28 Jun 2007, at 21:07, Jason Flatt wrote:
> On Thursday 28 June 2007 11:13:22 Stephen Wills wrote:
>> I have css elements to color the individual page titles in the block
>> book-navigation and as I hover over them they changes colors and all
>> is right with the world except I would like to highlight the page
>> title of the currently viewed page. I am wondering if anyone knows a
>> CSS trick that will redefine the .leaf class when the anchor element
>> it encloses is of class=active?
>>
>> Thanks.
>
> This works for me:
>
> li a.active {
> color: <whatever>;
> }
>
That would target the a tag. I think Stephen wants to target the
parent li tag when the child has a class of active?
<li class="leaf"><a href="/" class="active">example</a></li>
I don't think there is a way of doing that with CSS.
Maybe there's a way of adding a class to the .leaf using php in
template.php...
http://drupal.org/node/72013
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/themes/attachments/20070628/f32c49e6/attachment.htm
More information about the themes
mailing list