Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Junk: Junk: Drop down Menu
Ok, I'm noob at HTML. I would like anyone to make me a code of a drop down menu. It's for MyBB. What should be the code? Please help.
I will give you a tut on how I developed a drop-down menu for my site: (Over 1,000 members, and I'm not advertising, btw), click the "Site Links" to see the drop down menu.

Step 1: add this to you header template or something along these lines

<ul id="menu">
    <li><a href="#">Parent 01</a></li>
    <li><a href="#" class="selected">Parent 02 > </a>
            <li><a href="#">Item 01</a></li>
            <li><a href="#" class="selected">Item 02</a></li>
            <li><a href="#">Item 03</a></li>
        <div class="clear"></div>
    <li><a href="#">Parent 03 > </a>
        <li><a href="#">Item 04</a></li>
        <li><a href="#">Item 05</a></li>
        <li><a href="#">Item 06</a></li>
        <li><a href="#">Item 07</a></li>
        <div class="clear"></div>
    <li><a href="#">Parent 04</a></li>
Replace Parent with the menu item name and url and Item with the submenu name and link.

Once this is done you will need to edit your global.css (we will presume you know how to do this.)

Step 2: Add this to the bottom of your global CSS
/* remove the list style */
#menu {

#menu li {
    margin:0 1px;

/* this is the parent menu */
#menu li a {
    padding:8px 5px 0 5px;

#menu li a:hover {

/* submenu, it's hidden by default */
#menu ul {
    margin:0 0 0 -1px;

#menu ul li {
    border-top:1px solid #fff;

#menu ul a {
    padding: 8px 5px;

#menu ul a:hover {

*html #menu ul {
    margin:0 0 0 -2px;
Ofcouse you can change the style to customize it. once the css and template edits are done you will need to do one more thing.

Step 3: Add the javascript file and jquery to your headerinclude.

Open you header include template and add these lines
<script type="text/javascript" src=""></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/dropdownmenu.js"></script>
Make sure to download the file and put it in /jscripts

When done successfully it should work the same way as the menu at the top of this webpage the style is different though.
Thanks a lot mate.
No problem.
Very nice work
This thread has been junked!
This thread has been junked for a reason, leave it!

Forum Jump:

Users browsing this thread: 1 Guest(s)