Page 1 of 1

Menu Manager: How to target last <li>?

Posted: Sun Nov 12, 2006 11:27 pm
by Oliver
Hi any expert on Menu Manager

I try to adapt the simple_navigation.tpl on a CMS Made Simple 1.0.2 installation. I have created a simple vertical navigation with each of four main levels with its children packed into a rounded box like this:
Image

As you can see on the image its not quite perfect: I would need to add a rounded bottom border to the last (visible) child("Blogs")  in the active main menu item ("Werkzeuge"). But how can I address this last -element?

The output from the menu manager should look something like this:


 
    Startseite
 
 
    Werkzeuge
     
         
            CMS
         
         
            Blogs
         
     
 
 
    Inhalte
 
 
    Kontakt
 


Then I could attach a background-image to the li .lastChild selector in the CSS.

I hope I made my case clear enough - if not please ask - and please, help!

Thank you very much!

Oliver

[gelöscht durch Administrator]

Re: Menu Manager: How to target last <li>?

Posted: Tue Nov 14, 2006 1:32 am
by tsw
set the background for

ul ul {
bg.... left bottom;
}

that way every second level ul element will have that.

adding .last to menumanager would be great too, but I cant think of any way to do it right now.

Re: Menu Manager: How to target last <li>?

Posted: Tue Nov 14, 2006 9:21 am
by Dr.CSS
The other way is/could be a lot of coding and breaks if you change page order...

In menu manager add a{$node->id}, for a full explanation... three pages...

http://www.multiintech.com/index.php?page=imap1

not that you will need all of it but it will give you an idea how to pick out individual li elements for styling...

Re: Menu Manager: How to target last <li>?

Posted: Tue Nov 14, 2006 10:02 pm
by Oliver
Thanks tsw

I have been tinkering with this pure css solution. The problem I could not yet work around is the fact that I need to declare some background to the active link (e.g. .currentpage{bakckground-color:#FFAE00} and this rule is more specific (and thus overlays) the background-image declared with the ul ul {background: url(...)} rule.


Thank you mark

Looks like a valuable resource. I will work it through and see if I can do it this way.

Any further suggestions ?