WebsiteBaker Support (2.8.x) > Templates, Menus & Design

showmenu2 classes

(1/1)

BartAaldering:
hi all,

i'm struggling with styling a menu using showmenu2()

It's quite straightforward, an inline menu with some css applied to it. The call:

show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, ' | [a][menu_title]</a>', '', '', '', '[a][menu_title]</a>');

li.menu-current should affect the current menu item, but it doesn't. Well actually it does only the size of the text. [AC] stands for <a> tag including class > What class do they mean?

Can somebody give me the right classes for the current and the normal menu? Or any other way out?

Thanks a alot.

BerndJM:
Hi,

you're on the right way, in your example you can format the current like this:

--- Code: ---li.menu-current a { ... }
--- End code ---
so it should take all the formating, not only the text-size

[ac] use the same classes , so with [ac] you can format it like this:

--- Code: ---a.menu-current { ... }
--- End code ---
or

--- Code: ---li a.menu-current { ... }
--- End code ---

In both cases the same format also for the pseudo-classes a:active - a: hover - etc.

Regards Bernd

BartAaldering:
thanks for your reply, it was partially helpfull. Now I am able to change the menu-current, but do you have an idea style the whole menu?

BerndJM:
Hi,

for example you can put the SM2 call in a div with a class

--- Code: ---<div class="menu"><?php show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, &#39; | [a][menu_title]</a>&#39;, &#39;&#39;, &#39;&#39;, &#39;&#39;, &#39;[a][menu_title]</a>&#39;); ?></div>
--- End code ---
so you can style the menu based on this class:

--- Code: ---div.menu ul { ...}
div.menu li { ... }
and so on ...

--- End code ---

Regards Bernd

BartAaldering:
if you were a girl, i would kissed you   :wink:

Navigation

[0] Message Index

Go to full version