WebsiteBaker Support (2.8.x) > Templates, Menus & Design
show_menu2 CSS Issues
(1/1)
fshagan:
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: ---<div id="navlist">
<?php show_menu2(1,SM2-ROOT, SM2_CURR+1, SM2_ALL, '<li>[a][menu_title][/a]','</li>','','',0); ?>
</div>
--- End code ---
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: ---#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;}
--- End code ---
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?
BerndJM:
Hi,
--- Code: ---#navlist .menu-current a {color: #fff; background: #BA3F2F;}
--- End code ---
or
--- Code: ---#navlist li.menu-current a {color: #fff; background: #BA3F2F;}
--- End code ---
Regards Bernd
fshagan:
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.
Navigation
[0] Message Index
Go to full version