I need to add styling to a menu. The menu when viewed as source looks something like this:
menu 1
menu 2
submenu 1
submenu 2
menu 3
I need to be able to find the last submenu item for any menu and also find the last menu item so I can add a class/id to it to change the styling like this:
menu 1
menu 2
submenu 1
submenu 2
menu 3
Here are my styles as they currently exist.
#gutter_left ul li {
background-color: #00853f;
border-bottom:1px solid #FFFFFF;
}
#gutter_left ul li ul li {
background-color: #00853f;
border-bottom:1px dashed #FFFFFF;
}
#gutter_left .no_border {
border-bottom: 0;
}
I need to be able to find the number of list items, dynamically, and apply this if at all possible.
I am not sure what mod/com writes the menus. Any help would be helpful.
Thanks,
Dan
Find the last list item dynamically
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
-
- Joomla! Fledgling
- Posts: 2
- Joined: Sat Jun 17, 2006 1:22 am
Re: Find the last list item dynamically
Which version? 1.5 or 1.0.x?
http://springhillalumni.org • Springhill High School Alumni Association
-
- Joomla! Fledgling
- Posts: 2
- Joined: Sat Jun 17, 2006 1:22 am
Re: Find the last list item dynamically
1.0.13
Thanks,
Dan
Thanks,
Dan
Re: Find the last list item dynamically
I'm assuming you are using the stock menu. You might check this file, /modules/mod_mainmenu.php, as a start. I'm not certain at this time which line to start looking. However, I would think if you searched that file for elements you see in your web page source code, you should find the area.HurricaneDan wrote: 1.0.13
Thanks,
Dan
Good luck.
http://springhillalumni.org • Springhill High School Alumni Association