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


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • show_menu2 CSS Issues
  • Print
Pages: [1]   Go Down

Author Topic: show_menu2 CSS Issues  (Read 3447 times)

fshagan

  • Guest
show_menu2 CSS Issues
« on: December 17, 2008, 08:48:56 PM »
I'm porting a template and seem to be stuck on using the "menu-current" class in show_menu2().  Here's my HTML code:

Code: [Select]
<div id="navlist">
      <?php show_menu2(1,SM2-ROOT, SM2_CURR+1, SM2_ALL, &#39;<li>[a][menu_title][/a]&#39;,&#39;</li>&#39;,&#39;&#39;,&#39;&#39;,0);  ?>
 </div>

This does show the top-level pages on the page as I want it to. 

Here are my CSS declarations for the "navlist" DIV:

Code: [Select]
#navlist li {list-style : none;margin : 0;display : inline;}
#navlist li a {padding : 5px 0.75em;margin : 0;color : #fff;background : #7ABA2E;text-decoration : none;}
#navlist li a:link {color : #fff;background :#7ABA2E;}
#navlist li a:visited {color : #fff;background : #7ABA2E;}
#navlist li a:hover {color : #fff;background : #BA3F2F;}
#navlist .menu-current {color: #fff; background: #BA3F2F;}

All of this works nicely.  The top-level pages display as they should in the menu bar, and when you hover over them they turn red (#BA3F2F;). 

But that last declaration, using .menu-current, is the one I can't get to work.  I've tried it with "li menu-current", "li.menu-current", "li a:menu-current", and every other combination I've thought of (except the right one, of course). 

Anyone have any ideas? 
Logged

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: show_menu2 CSS Issues
« Reply #1 on: December 17, 2008, 09:25:25 PM »
Hi,

Code: [Select]
#navlist .menu-current a {color: #fff; background: #BA3F2F;}
or
Code: [Select]
#navlist li.menu-current a {color: #fff; background: #BA3F2F;}

Regards Bernd
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

fshagan

  • Guest
Re: show_menu2 CSS Issues
« Reply #2 on: December 17, 2008, 11:11:53 PM »
Thanks, Bernd. 

I must have something over-riding the style elsewhere in my stylesheet, as neither line works to highlight the current page.  Its good to have the correct CSS syntax so I know where else to look.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • show_menu2 CSS Issues
 

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