Different image for each menu link

G4

Thank you! Also for the explanation.

Ruud

The menu-nn class is in the <a> link.
So the .menu styling is for defaults and positioning.

Remove the .menu-nn styles in your example.
Just set the color with:

Code (untested) Select
.menu li a.menu-24 { color: red; }
.menu li a.menu-24:hover { whatever hover action }
.menu li.menu_current a.menu-24 { whatever current action }

[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

G4

#3
It does not work. What am I doing wrong?

Output:
<ul class="menu-top"><li class="menu-expand menu-current menu-first"><a href="http://www.mysite.nl/testpage/" class="menu-22">Menulink 1 &gt;</a><ul class=""><li class="menu-child menu-first"><a href="http://www.mysite.nl/testpage/pages/Menulink 1/Sublink A.php" class="menu-24">Sublink A</a></li><li class="menu-child"><a href="http://www.mysite.nl/testpage/pages/Menulink 1/Sublink B.php" class="menu-25">Sublink B</a>
etc.


Stylesheet:
/* MENU  */
.menu{float:left;font-size:14px;width:220px;height:auto;margin:1px 0 0 0;text-align:left;font-weight:bold;line-height:18px;background-color:#fff}
.menu ul{border-top:0;list-style-type:none;padding:0;margin:0}
.menu ul ul{text-decoration:none;border:0;padding:0;margin:0}
.menu li{border:0;border-bottom:1px solid #fcb816}
.menu ul ul li{border:0;border-top:1px solid #7A7A7C}
.menu ul ul a{border-left:solid 5px #7A7A7C;color:#000}
.menu a{color:#f79b17}
.menu a:link, .menu a:visited, .menu a:active{padding:2px 10px 4px 10px;display:block;text-decoration:none;padding-top:4px}
.menu a:hover{display:block;color:#fff;background-color:#f79b17}
.menu_current a{color:#fff;font-weight:bold;background-color:#f79b17}

/* ID 24 */
.menu-24{float:left;font-size:14px;width:220px;height:auto;margin:1px 0 0 0;text-align:left;font-weight:bold;line-height:18px;background-color:#fff}
.menu-24 ul{border-top:0;list-style-type:none;padding:0;margin:0}
.menu-24 ul ul{text-decoration:none;border:0;padding:0;margin:0}
.menu-24 li{border:0;border-bottom:1px solid red}
.menu-24 ul ul li{border:0;border-top:1px solid red}
.menu-24 ul ul a{border-left:solid 5px red;color:#000}
.menu-24 a{color:red}
.menu-24 a:link, .menu-22 a:visited, .menu-22 a:active{padding:2px 10px 4px 10px;display:block;text-decoration:none;padding-top:4px}
.menu-24 a:hover{display:block;color:red;background-color:red}
.menu-22_current a{color:red;font-weight:bold;background-color:red}

Ruud

#2
Try the following example with show_menu2()



<?php show_menu2(0SM2_ROOTSM2_START+1,SM2_TRIM'[li]<a href="[url]" class="menu-[page_id]">[menu_title]</a>' ); ?>


It should give a class "menu-nn" in the <a> tag.
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

G4

#1
How can I style each menu link like the following example? Is it possible to use page ID's?