The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Add Submenu items – dropdown Reply To: Add Submenu items – dropdown

Chris Coyier

Looks like the list item that has the submenu has a class menu-item-has-childrenso you could write like…

.menu-item-has-children .sub-menu {
  /* hide this by default somehow maybe like this: */
  height: 0;
  overflow: hidden;

Then you’ll have to write some JavaScript to deal with opening it, something like…

$(".menu-item-has-children").on("click", function() {

in which this CSS would do the opening .sub-menu {
  height: auto;

There is lots more fancy things you could do, but that’ll get you started.