Title: Creating dropdown menu
Last modified: August 18, 2016

---

# Creating dropdown menu

 *  [stigroar](https://wordpress.org/support/users/stigroar/)
 * (@stigroar)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/creating-dropdown-menu/)
 * Hello!
 * I have managed to create a dropdown menu based on the theme Unsleepable ([http://www.openswitch.org/2006/04/16/unsleepable/](http://www.openswitch.org/2006/04/16/unsleepable/))
   and Son of Suckerfish for WP ([http://www.invokemedia.com/css-dropdown-menu-with-wordpress.html](http://www.invokemedia.com/css-dropdown-menu-with-wordpress.html)).
 * My problem is that all the submenu items get the same height as the buttons on
   the top in the theme (about, contact, links etc.). How can this be fixed? Except
   from this, the menu seems to work fine.
 * Code:
 * header.php:
 * between <head></head>:
    <script language=”javascript” type=”text/javascript” 
   > sfHover = function() { var sfEls = document.getElementById(“nav”).getElementsByTagName(“
   LI”); for (i in sfEls){ sfEls[i].onmouseover=function() { this.className+=” sfhover”;}
   sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(”
   sfhover\\b”), “”); } } } if (window.attachEvent) window.attachEvent(“onload”,
   sfHover); </script>
 * in <body>:
 *  <ul id=”toolbar”>
    <?php wp_list_pages(‘sort_column=menu_order’); ?>
 * style.css:
 * /*menu */
 * #nav {
 *  margin-left: 0px;
 *  list-style: none;
 *  padding: 0;
 *  border: 1px solid #fff;
 *  border-width: 0px 0px 0px 1px;
 * }
 * #nav ul {
 *  margin: 0;
 *  padding: 0;
 *  height: 1em;
 *  }
 * #toolbar form {
 *  margin: 0;
    padding: 0; list-style-type: none; list-style-image: none; text-
   transform: lowercase;
 *  }
 * #toolbar input {
 *  margin: 1px;
 *  }
 * #nav a {
 *  display: block;
    width: 7em; text-align: center; height: 20px; line-height: 
   50px; padding: 50px 0 0;
 * color: #fff;
    text-decoration: none;
 * }
 * #nav li {
 *  float: left;
    width: 7em; border-right: 1px solid #555;
 * padding: 0;
    background: #333333;
 * }
 * #nav li ul {
 *  position: absolute;
 *  left: -999em;
 *  height: auto;
 *  width: 14.4em;
 *  w\idth: 12.9em;
 *  font-weight: normal;
 *  border: 1px solid #fff;
 *  margin: 0;
 *  list-style: none;
 * }
 * #nav li li {
 *  padding-right: 1em;
 *  width: 13.4em;
 *  border: 0px;
 * }
 * #nav li ul a {
 *  width: 12em;
 *  w\idth: 9em;
 * }
 * #nav li ul ul {
 *  margin: -1.75em 0 0 14em;
 * }
 * #nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover
   ul ul ul {
 *  left: -999em;
 * }
 * #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover
   ul, #nav li li.sfhover ul, #nav li li li.sfhover ul {
 *  left: auto;
 * }
 * #nav li:hover, #nav li.sfhover {
 *  background: #7e2e37;
 * }
 * /* end menu */
 * Thanks in advance ! 😀

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [dje](https://wordpress.org/support/users/dje/)
 * (@dje)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/creating-dropdown-menu/#post-415090)
 * Too much code!
    Post your website address so we can take a look, (it is not in
   your profile).
 *  [Rok](https://wordpress.org/support/users/rok/)
 * (@rok)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/creating-dropdown-menu/#post-415146)
 * This post is appearing many times. But God knows “why the author” is not posting
   his site link. It is alwyas better to post site link, as it helps in checking
   the exact problem.
 *  Thread Starter [stigroar](https://wordpress.org/support/users/stigroar/)
 * (@stigroar)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/creating-dropdown-menu/#post-415208)
 * sorry, but the reason for not posting the link is that the site cannot be public
   yet for many reasons. if you need a link, I will have to make a test site with
   other information, and then I will need some time.
 *  [Rok](https://wordpress.org/support/users/rok/)
 * (@rok)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/creating-dropdown-menu/#post-415212)
 * No you need not to be sorry! The reason behind ‘objected about double posting’
   is that “if you do so, the post looses the interest.”
 *  [ladydelaluna](https://wordpress.org/support/users/ladydelaluna/)
 * (@ladydelaluna)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/creating-dropdown-menu/#post-415213)
 * Isn’t this javascript related?
    Not to be rude, but why not try going to a forum
   or site that teaches javascript?
 *  [spencerp](https://wordpress.org/support/users/spencerp/)
 * (@spencerp)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/creating-dropdown-menu/#post-415214)
 * Being that the “[Original Author](http://wordpress.org/support/profile/34573)”
   of the [css-dropdown-menu-with-wordpress](http://wordpress.org/support/topic/51942?replies=9#post-284626)
   
   has not been “active” for the past 3 months, and that thread was posted 7 months
   ago..
 * Your best bet is to [Contact](http://www.invokemedia.com/contact/) them, directly..
   or go to here: [http://www.openswitch.org](http://www.openswitch.org) and find
   help..
 * Please don’t post lengthy codes.. people *hate* having to scroll miles, downwards,
   just to post replies like this, to help, and to tell you NOT do it.. sigh..
 * spencerp
 * *Or, do what lady suggests.. 😉 I just noticed, but..Lady and I have been on 
   the WP forums, for 9 months now.. =P Before we know it, a year will be up! =)
 *  Thread Starter [stigroar](https://wordpress.org/support/users/stigroar/)
 * (@stigroar)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/creating-dropdown-menu/#post-415280)
 * I have managed to configure a working menu! See here: [http://wordpress.org/support/topic/99723?replies=1](http://wordpress.org/support/topic/99723?replies=1)
 *  [Root](https://wordpress.org/support/users/root/)
 * (@root)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/creating-dropdown-menu/#post-415281)
 * Javascript drop downs are just like so 2006 you know?
 *  Thread Starter [stigroar](https://wordpress.org/support/users/stigroar/)
 * (@stigroar)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/creating-dropdown-menu/#post-415282)
 * not sure what you mean

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Creating dropdown menu’ is closed to new replies.

## Tags

 * [delete](https://wordpress.org/support/topic-tag/delete/)

 * 9 replies
 * 6 participants
 * Last reply from: [stigroar](https://wordpress.org/support/users/stigroar/)
 * Last activity: [19 years, 5 months ago](https://wordpress.org/support/topic/creating-dropdown-menu/#post-415282)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
