0

Hi
i have two different menu that are included in all my pages: Top menu and left menu, they have in common the same functions that are stored in the same document "functions.php":

    <?php
    // function to draw menu (top and left)
    function draw_menu($script, $items, $div_id) {
    // start the list for the menu
    $menu = ' <ul id="list-nav">';
    // loop through the array with menus and submenus
    foreach($items as $url => $val) {
    $text = $val['text'];
    if($script == $url) {
    // if the item in the array is the current page, highlight it
    $menu .= '<li><a style="color:#eb0089" href="#nogo"> '. $text . ' </a></li>';
    } else {
    // else display it as usual link
    $menu .= '<li><a href="' . $url . '">' . $text . '</a></li>';
    }
    }
    // end the list
    $menu .= '</ul>';
    return $menu;
    }
    // function to draw submenu below the main menu on left side
    function draw_sub_menu($script, $items) {
    // find the correct submenu items to draw
    foreach($items as $url => $val) {
    // if the current page is on the top level (index.php, book.php...)
    if($script == $url) {
    if(isset($val['submenu']) && !empty($val['submenu'])) {
    $submenu = draw_menu($script, $val['submenu']);
    return $submenu;
    } else {
    return '';
    }
    }
    // if the current page is not on the top level, examine each submenu entry
    if(isset($val['submenu']) && !empty($val['submenu'])) {
    if($script == $val['submenu']['url']) {
    $submenu = draw_menu($script, $val['submenu']);
    return $submenu;
    }
    }
    }
    // if no submenus were drawn return empty string
    return '';
    }
    ?>

they have the same class, but under the style.css using the different ID i give to each menu a different look:
THe problem is that i have to use in the left menu and in the submenu a bullet but i can't see it, i tried everything and it doesn't want to show up, the following is the class for the style for the top menu:

ul#list-nav {
/*list-style:none;*/
direction:ltr;
font-size:10.5px;
}

ul#list-nav li {
display:inline;
/*list-style::url("../images/plus.png")!important;
list-style:circle;*/
border-right:1px #575354 solid;
padding:0 35px 0 35px;
}

ul#list-nav li a {
text-decoration:none;
font-weight:normal;
color:#000000;
text-align:center;
}

ul#list-nav li a:hover {
color:#eb0089;
}

And ths is left menu and submenu style:

#leftMenu ul#list-nav, #submenu ul#list-nav
{
list-style-image:url("../images/plus.png")!important;
}

#leftMenu ul#list-nav, #leftMenu ul#list-nav li, #leftMenu ul#list-nav li a {
display:block;
border-right:0 #575354 solid;
margin-left:0;
padding-left:0;
font-weight:bold;
text-align:left;
line-height:20px;
}

#submenu ul#list-nav, #submenu ul#list-nav li,  #submenu ul#list-nav li a {
display:block;
border-right:0 #575354 solid;
margin-bottom:14px;
margin-left:0;
padding-left:0;
text-align:left;
}


#submenu ul#list-nav{
margin-top:30px;
}

Please help, i don't know what to do.
Thanks

2
Contributors
1
Reply
5
Views
5 Years
Discussion Span
Last Post by LastMitch
0

THe problem is that i have to use in the left menu and in the submenu a bullet but i can't see it, i tried everything and it doesn't want to show up, the following is the class for the style for the top menu:

You need javascript or ajax the data in the array.

Next time put all your code in one thread:

http://www.daniweb.com/web-development/threads/433124/disappearing-submenu

http://www.daniweb.com/web-development/threads/433120/-menu-with-a-name-that-works-only-in-chrome

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.