Menu Manager: How to target last <li>?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Oliver
Forum Members
Forum Members
Posts: 28
Joined: Wed Mar 15, 2006 9:50 pm

Menu Manager: How to target last <li>?

Post 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]
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

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

Post 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.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

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

Post 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...
Oliver
Forum Members
Forum Members
Posts: 28
Joined: Wed Mar 15, 2006 9:50 pm

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

Post 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 ?
Post Reply

Return to “CMSMS Core”