Different hover colors possible on CSS menu?

macsmet

@Webbird: Wow, never knew SM2 was that powerfull!!!!
It works, thanks!

Greetings,

MacSmet

WebBird

Quote from: WebBird on October 07, 2009, 02:03:41 PM
If you're using show_menu2(), you can have a different CSS class for every menu item. See the docs for more info.

Having this, you can set a different hover color for _every_ item, or for a level.

No need to split the menu.

Example:


menu-2 a:hover {
    color: red;
}


http://www.websitebakers.de/sm2/media/README.en.txt

WebBird

If you're using show_menu2(), you can have a different CSS class for every menu item. See the docs for more info.

Having this, you can set a different hover color for _every_ item, or for a level.

No need to split the menu.

Example:


menu-2 a:hover {
    color: red;
}

LordDarkman

#4
Quick an Dirty: Split it into 2 menus with difrennt classes. First class hover:black, second hover:blue

I'm useing this at my Page at The top Menu and a side menu. I have 2 calls of show_menu2 so it's easy to make 2 css classes.

CU Moritz

What i mean:
<?php show_menu2(1SM2_ROOTSM2_CURR+1SM2_SIBLING
,'<span class="menu1">[a][menu_title]</a></span>','','','','',''); ?>

<?php show_menu2(2SM2_ROOTSM2_CURR+1SM2_SIBLING
,'<span class="menu2">[a][menu_title]</a></span>','','','','',''); ?>

macsmet

@Lorddarkman: thanks for your answer but it is more complicated than you probably think.
Of course I know how to do what you describe but that's not my question.
My question is that I want the 1st, 2nd and 3rd menulink to be black on hover and the 4th and 5th menulink to be blue on hover. So different colors for just 2 menulinks on hover!

I hope you can give me an answer and solution.

Greetings,

MacSmet

LordDarkman

You want to change the color in one link? something like "this is the next link" or do you want to change the menu like this:
Main
    submenu1
    submenu2

        anothermenu

    submenu3


If you mean the Second just have a look at the Demosite http://code.jellycan.com/sm2test/ You find everything about show_menu2 there. If you need help tell us.

CU Moritz

macsmet

Hi there,

I wonder whether it is possible to have different hover colors on the same menu?
I read somewhere you have to use a 'class' definition in your css and the <li> code but how do I use this?
Suppose I got a menu and I want the 4th and 5th word to have different hover colors than the 1st, 2nd and 3rd word.
How does this work or is it not possible?

Greetings,

MacSmet