WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Different hover colors possible on CSS menu?
  • Print
Pages: [1]   Go Down

Author Topic: Different hover colors possible on CSS menu?  (Read 6269 times)

Offline macsmet

  • Posts: 255
Different hover colors possible on CSS menu?
« on: October 06, 2009, 06:45:42 PM »
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
Logged

LordDarkman

  • Guest
Re: Different hover colors possible on CSS menu?
« Reply #1 on: October 06, 2009, 10:36:02 PM »
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
Logged

Offline macsmet

  • Posts: 255
Re: Different hover colors possible on CSS menu?
« Reply #2 on: October 06, 2009, 10:47:00 PM »
@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
Logged

LordDarkman

  • Guest
Re: Different hover colors possible on CSS menu?
« Reply #3 on: October 06, 2009, 10:53:12 PM »
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:
Code: [Select]
<?php show_menu2(1, SM2_ROOT, SM2_CURR+1, SM2_SIBLING
,&#39;<span class="menu1">[a][menu_title]</a></span>&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;); ?>

<?php show_menu2(2, SM2_ROOT, SM2_CURR+1, SM2_SIBLING
,&#39;<span class="menu2">[a][menu_title]</a></span>&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;); ?>
« Last Edit: October 06, 2009, 11:00:52 PM by LordDarkman »
Logged

WebBird

  • Guest
Re: Different hover colors possible on CSS menu?
« Reply #4 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:

Code: [Select]
menu-2 a:hover {
    color: red;
}
Logged

WebBird

  • Guest
Re: Different hover colors possible on CSS menu?
« Reply #5 on: October 07, 2009, 02:06:28 PM »
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:

Code: [Select]
menu-2 a:hover {
    color: red;
}

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

Offline macsmet

  • Posts: 255
Re: Different hover colors possible on CSS menu?
« Reply #6 on: October 07, 2009, 04:21:47 PM »
@Webbird: Wow, never knew SM2 was that powerfull!!!!
It works, thanks!

Greetings,

MacSmet
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Different hover colors possible on CSS menu?
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2