navigation css for each page applied to ul
Hi
Is there a way to apply a css class to the ul element of the navigation module (customnav) for each page ?
If I go to the site structure and assign a css class to a page, the class is papplied to the active li element of the menu.
I need to access the ul element, and assign to it a different css class for each page.
Second question : I use the css attribute nth-child(n) to modify the background color of my menu items (each item has a different color). It doesn't work on I.E. do you know how can I achieve it easily ?
Code:
#menu li:nth-child(3)
{
background-color:#97005E;
}
Thank you
Re: navigation css for each page applied to ul
both can be done using a custom template. the first by looping through your items and extracting the classes prior to outputting the html. the second by adding a class name using an incrementing counter.
neither can be done via contao settings/templates. small chance you'd be able to do this using extension, but don't count on that. I'd say you need to make a custom nav template.