It uses the standard CSS Menus Action and extends the menu items with their own CSS styles. I’ve used nth child selectors in the CSS to target the second, third, fourth, etc menu items which works on all browsers apart from (you guessed it) IE 6, 7 and 8. These browsers will see the plain single coloured menu on the right.
If you wanted a belt and braces approach to this and wanted to support these browsers then I’d suggest either creating a simple Action to style the menu items or use JavaScript in the browser to style them on the client side.
Regards,
Tim.
On 26 Aug 2011, at 13:34, Sly wrote:
Does anyone know of a way to create a multi coloured CSS Menu Nav in Freeway?
I don’t mind dropping support for IE6, but I don’t think the client will swallow losing IE7 & 8.
I can’t imagine how to create an Action to style the menu items.
But, I wonder if I could do as you’ve done but with class names rather than nth child. I assume class names are supported in IE 6, 7 & 8! (Joke, but not laughing!)
I’ll have a look into it.
Thanks a million for the working file and explanation.
For further info: I’ve managed to adapt Tim’s solution to work with class names rather than nth items, to enable IE compatibility.
Technique:
Highlight each link in the css menu, then >Edit>Hyperlink> then click Extended, click New: Name: class, Value: home (or an individual name for this link) click OK, OK, OK.
Repeat this for every link in the css menu.
Now you can target each link by adding css like this in the ‘Head’ and specifying a different colour:
Hi Sly,
That’s a great solution. I must admit that it hadn’t occurred to me to add a class to the links rather than the list items.
As you say this should now work in pretty much any browser.
Regards,
Tim.
Hi Sly,
The CSS Menus Action already creates class styles for the first and last menu items (fwFirstChild and fwLastChild). Assuming you leave one menu item as the base colour set in the CSS menus Action that leaves just three menu items that need targeting in your example.
I think your solution is great and should be consistent over all browsers which is the main thing.
I created a simple Action just before you sent your solution that adds class names (based on a base name) to all list items in a given list (like your menu). Although you still need to add the CSS to style these manually it should mean a lot less manually extending of links.
Regards,
Tim.
On 26 Aug 2011, at 16:42, Sly wrote:
Though slightly more buggering about than your neat solution, at least it panders to IE for now. Grrrr.