WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Menu, CSS, Droplet; childeren not showing CSS in menu properly

<< < (2/2)

jacobi22:
thx  :|

BartA:

--- Quote from: jacobi22 on April 15, 2012, 07:57:23 PM ---
--- Quote from: BartA on April 15, 2012, 07:19:37 PM ---here's my showmenu in the index.php, wich is working fine, as long as i'm in the parent level.

show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF">  |  [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a>')


--- End quote ---

dont forget the closed font-Tag (</font>( behind the |
like


--- Code: ---show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF">  |</font> [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a>');
--- End code ---


--- Quote from: BartA on April 15, 2012, 07:19:37 PM ---the problem comes up after clicking a link in the menu ( in the droplet i made):

ob_start();
show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL|SM2_CURRTREE);
$content = ob_get_contents();
ob_end_clean();
return $content.' ';

--- End quote ---

try to use this code for using the extra show_menu2-parameters like


--- Code: ---ob_start();
show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL|SM2_CURRTREE, '<a href="[url]" class="[class]">[menu_title]</a>', '', '', '');)
$content = ob_get_contents();
ob_end_clean();
return $content.' ';
--- End code ---

or


--- Code: ---ob_start();
show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL|SM2_CURRTREE,
          '<li class="[class]"><a href="[url]" class="[class] men">[menu_title]</a>', '</li>', '<ul class="submenu>', '</ul>');
$content = ob_get_contents();
ob_end_clean();
return $content.' ';
--- End code ---


--- End quote ---

thank your for your reply, but i guess the problem is not entirely clear. The normal showmenu2 is working fine, untill you are getting a level deeper:

this is the home page:



this is the submenu

jacobi22:
thats not a menu-problem in the main-menu, only css

change your css-part from


--- Code: ---#menu, a.menu {
        position:relative;
        width:700px;
        height:28px;
        z-index:8;
        top: 154px;
        vertical-align: bottom;
        padding-left: 5px;
        font-family:Verdana, Arial, Helvetica, sans-serif;
        font-size: 15px;
        color:#FFFFFF;
        }
--- End code ---

to


--- Code: ---#menu a {
        position:relative;
        width:700px;
        height:28px;
        z-index:8;
        top: 154px;
        vertical-align: bottom;
        padding-left: 5px;
        font-family:Verdana, Arial, Helvetica, sans-serif;
        font-size: 15px;
        color:#FFFFFF;
        font-weight:bolder;
        text-decoration:none;
        }
--- End code ---

BartA:
that was simple, but i don't quite understand why it did work on the parent level.

thanks very much!

jacobi22:
in parent level the show_menu2 set css-classes for all menu-points, not so in the second level, the class for 'Cursussen' and 'Openingstijden' is (was) empty

Navigation

[0] Message Index

[*] Previous page

Go to full version