WebsiteBaker Support (2.8.x) > Templates, Menus & Design
css and showmenu2
terrajohn:
I have been trying already a lot of things but it seems I can't get things right...
I have a menu consisting of two levels. I use the showmenu2 in the correct way. I get all the menu etc...
But apparently I can not change the font color for the current item (using the .menu current class - i can add borders, background color - but when defining the font color it has no effect....)
I want the following
ITEM 1
ITEM 2
item 1
item 2
item 3
ITEM 3
ITEM 4
....
Where ITEM : bold and other color when active
Where item : should be normal and other color when active
Any suggestions here (i already took a look at the www.websitebakers.d e/sm2/ site as well as the posts on this forum)
thanks in advance
erpe0812:
Hi
would be nice if you post your sm2 call and a link to your homepage.
This makes helping easier :wink:
rgds
erpe
terrajohn:
This is the latest version I'm using:
--- Code: ---<?php show_menu2(0, SM2_ROOT+1, SM2_CURR+1); ?>
--- End code ---
But I have tried multiple different variatons (including the extend one):
--- Code: ---<?php show_menu2(
$aMenu = 0,
$aStart = SM2_ROOT+1,
$aMaxLevel = SM2_ALL,
$aOptions = SM2_TRIM|SM2_PRETTY,
$aItemOpen = '<li><a href="[url]" target="[target]">[menu_title]</a>',
$aItemClose = '</li>',
$aMenuOpen = '<ul class="leftside">',
$aMenuClose = '</ul>',
$aTopItemOpen = false,
$aTopMenuOpen = false
);
?>
--- End code ---
Concerning the $aMenuOpen class - I have been working with as well as without this class
The CSS is (leftside being the div in which the menu is positioned) - it is a bit messy because of the trial and error:
--- Code: ---
#leftside
{
clear: left;
width: 150px;
margin: 0 auto;
font-size: 11px;
float: left;
margin:0 0 5px;
padding:0;
}
#leftside ul
{
padding: 0px;
margin: 6px 0 0 10px;
color: #707070;
display: block;
width: 150px;
font: Arial, Helvetica, sans-serif;
border: 1px solid #e60000;
}
#leftside ul ul
{
padding: 0px;
margin: 6px 0 0 10px;
color: #707070;
display: block;
width: 139px;
font: Arial, Helvetica, sans-serif;
font-weight: normal;
border: 1px solid;
}
#leftside ul ul li
{
padding: 0px;
margin: 6px 0 0 10px;
color: #e60000;
display: block;
width: 139px;
font: Arial, Helvetica, sans-serif;
font-weight: normal;
}
#leftside ul li { display: block; padding-bottom: 8px;}
#leftside ul li a
{
text-decoration: none;
color: #707070;
}
#leftside ul li a:hover
{
color: #e60000;
}
#leftside .menu-current
{
font-weight: bold;
color: #e60000;
}
#leftside .menu-parent
{
font-weight: bold;
color: #e60000;
}
--- End code ---
erpe0812:
try this:
--- Code: ---#leftside .menu-current a
{
font-weight: bold;
color: #e60000;
}
--- End code ---
rgds
erpe
terrajohn:
Erpe,
Thanks - this indeed does the trick for the current item in sublevel 2. But it seems you can't have and the current topmenu and the current submenu item differently styled
or you should maybe create ul li .menu current a and a ul ul li. menu current a style. I'll check this out later
It seems like I also still have an indent problem. To be sorted
Navigation
[0] Message Index
[#] Next page
Go to full version