• Hi, I’ve been trying to add a dropdown menu to a custom-made theme but there is too much space between the main nav items and the dropdowns relative to them, so they disappear.

    Here is the CSS for it:

    #access ul ul {
    box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
    -moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
    -webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
    display: none;
    position: absolute;
    top: 38px;
    left: 0;
    float: left;
    width: 180px;
    z-index: 99999;
    }
    #access ul ul li {
    min-width: 180px;
    }
    #access ul ul ul {
    left: 100%;
    top: 0;
    }
    #access ul ul a {
    background: #fff;
    line-height: 1em;
    padding: 10px;
    width: 160px;
    height: auto;
    }
    #access li:hover > a,
    #access ul ul :hover > a {
    background: #fff;
    color: #c2042a;
    }
    #access ul li:hover > ul {
    display: block;

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter njwest

    (@njwest)

    Here is the full menu CSS:

    /* =Menu
    ————————————————————– */

    #access {
    background: #fff;
    display: block;
    float: left;
    margin: 0 auto;
    width: 880px;
    padding: 10px 60px;
    }
    #access .menu-header,
    div.menu {
    font-size: 11px;
    margin-left: 0px;
    width: 880px;
    }
    #access .menu-header ul,
    div.menu ul {
    list-style: none;
    margin: 0;
    }
    #access .menu-header li,
    div.menu li {
    float: left;
    position: relative;
    }
    #access a {
    color: #5f6a72;
    display: block;
    line-height: 14px;
    padding: 0 10px 0 0;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: uppercase;
    width: 100px;
    text-align: center;
    }
    #access ul ul {
    box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
    -moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
    -webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
    display: none;
    position: absolute;
    top: 38px;
    left: 0;
    float: left;
    width: 180px;
    z-index: 99999;
    }
    #access ul ul li {
    min-width: 180px;
    }
    #access ul ul ul {
    left: 100%;
    top: 0;
    }
    #access ul ul a {
    background: #fff;
    line-height: 1em;
    padding: 10px;
    width: 160px;
    height: auto;
    }
    #access li:hover > a,
    #access ul ul :hover > a {
    background: #fff;
    color: #c2042a;
    }
    #access ul li:hover > ul {
    display: block;
    }
    #access ul li.current_page_item > a,
    #access ul li.current-menu-ancestor > a,
    #access ul li.current-menu-item > a,
    #access ul li.current-menu-parent > a {
    color: #000;
    }
    * html #access ul li.current_page_item a,
    * html #access ul li.current-menu-ancestor a,
    * html #access ul li.current-menu-item a,
    * html #access ul li.current-menu-parent a,
    * html #access ul li a:hover {
    color: #000;
    }

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    So the CSS responsible is the top value:

    #access ul ul {
    ...
    top: 38px;
    ...
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dropdown Menu Disappears; Too Much Space between Nav and Dropdown Menu’ is closed to new replies.