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.8 is now available!


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 »
  • Menu, CSS, Droplet; childeren not showing CSS in menu properly
  • Print
Pages: [1]   Go Down

Author Topic: Menu, CSS, Droplet; childeren not showing CSS in menu properly  (Read 8734 times)

BartAaldering

  • Guest
Menu, CSS, Droplet; childeren not showing CSS in menu properly
« on: April 10, 2012, 09:17:54 PM »
Hi all,

i'm having some troubles with the CSS of my menu (childeren menu), used as a droplet. I'm not shure what is causing this problem.

- The menu works fine, in the top-level pages,
- In the childern menu:

 The menu-expand, menu first is applied to the first two links, then two links with no CSS-class at all for some reason, and the last one has menu-last

I can't figure out why there is no CSS-class for those links.

Example is viewable on

http://89.18.178.164/~marein/pages/assortiment/wol.php
Logged

jacobi22

  • Guest
Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
« Reply #1 on: April 10, 2012, 10:34:26 PM »
can you post your show_menu-Code from the Template index.php?
Logged

BartAaldering

  • Guest
Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
« Reply #2 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>')

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.' ';
« Last Edit: April 15, 2012, 07:46:45 PM by BartA »
Logged

jacobi22

  • Guest
Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
« Reply #3 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>')


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

Code: [Select]
show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF">  |</font> [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a>');
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.' ';

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

Code: [Select]
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.' ';

or

Code: [Select]
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.' ';
Logged

Offline DarkViper

  • Forum administrator
  • *****
  • Posts: 3087
  • Gender: Female
Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
« Reply #4 on: April 15, 2012, 10:58:33 PM »
the same code, a little bit shorter:
Code: [Select]
<?php

return show_menu2(0, SM2_CURR+1, SM2_ALL, SM2_ALL | SM2_CURRTREE | SM2_BUFFER, ... );

?>
Logged
Der blaue Planet - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen

"We need education to cope with digitalization - and NOT the digitalization of education.!"

Tägliches Stoßgebet: Oh Herr, wirf Hirn vom Himmel !

jacobi22

  • Guest
Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
« Reply #5 on: April 15, 2012, 11:43:48 PM »
thx  :|
Logged

BartAaldering

  • Guest
Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
« Reply #6 on: April 16, 2012, 07:34:19 PM »
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>')


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

Code: [Select]
show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF">  |</font> [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a>');
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.' ';

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

Code: [Select]
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.' ';

or

Code: [Select]
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.' ';


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

Logged

jacobi22

  • Guest
Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
« Reply #7 on: April 16, 2012, 07:57:15 PM »
thats not a menu-problem in the main-menu, only css

change your css-part from

Code: [Select]
#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;
        }

to

Code: [Select]
#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;
        }
Logged

BartAaldering

  • Guest
Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
« Reply #8 on: April 16, 2012, 08:03:09 PM »
that was simple, but i don't quite understand why it did work on the parent level.

thanks very much!
Logged

jacobi22

  • Guest
Re: Menu, CSS, Droplet; childeren not showing CSS in menu properly
« Reply #9 on: April 16, 2012, 08:07:52 PM »
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
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Menu, CSS, Droplet; childeren not showing CSS in menu properly
 

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