• Resolved Minnow Legbone

    (@minnow-legbone)


    I created a drop down menu in the twenty eleven theme. It appears that the “hit” area of the “clock” button is only the text. So when you hover over the text, the drop down sub menus appear but as soon as you move the mouse off the text, the sub menu disappears making it impossible to click on. Is there a way to increase the “hit” area to resolve this? I am using a child theme for CSS tweaks.

    thanks

    https://hcasi.com/testsite/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You probably need to move the submenu up a pixel or two, with margin-top or top.

    It’s difficult to determine specifically as we can’t see your website.

    Thread Starter Minnow Legbone

    (@minnow-legbone)

    Sorry. I removed the permissions.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    On the anchor tags, remove line height and add padding top and bottom.

    Thread Starter Minnow Legbone

    (@minnow-legbone)

    Here’s what I added to my child theme CSS file

    #access a
    {
    color: #eeeeee;
    display: block;
    line-height: none;
    padding-top: 5px;
    padding-right: 1.2125em;
    padding-bottom: 5px;
    padding-left: 1.2125em;
    }

    It seems to just make the grey menu bar wider

    your positioning of the content area is ‘covering’ the lower half of the menu items:

    /*position of content*/
    .singular.page .hentry {
        top: -50px;
    }

    consider to achieve in a different way, for what you added that css.

    possibly by reducing the top padding of:

    .singular.page .hentry {
    	padding: 3.5em 0 0;
    }
    Thread Starter Minnow Legbone

    (@minnow-legbone)

    That worked. Thanks.
    So the drop down menu cannot be on top of the content? I was trying to decrease space between the bottom of the menu and the top of my content. I think it would look better visually.

    So the drop down menu cannot be on top of the content?

    it can –

    but positioning elements can be tricky:

    https://www.w3schools.com/css/css_positioning.asp

    Thread Starter Minnow Legbone

    (@minnow-legbone)

    Too tricky for me. lol.

    Thanks for the link. I though the answer may lie in the z-index. I guess not.

    This is what I tried

    /*position of content*/
    .singular.page .hentry {
    top: -50px;
    z-index: 1;
    }
    /*Position of drop down menu*/
    nav#access {z-index:9999;}

    Thread Starter Minnow Legbone

    (@minnow-legbone)

    I got it!

    To assign a z-index value to an element, the element must be positioned (position:absolute;)

    That did it! Thanks again for pointing me in the right direction! Much appreciated!

    Thread Starter Minnow Legbone

    (@minnow-legbone)

    This is the fix.

    /*Position of drop down menu*/
    nav#access {
    z-index:9999;
    position: fixed;
    }

    Thread Starter Minnow Legbone

    (@minnow-legbone)

    Oops…

    Position:Fixed isn’t the right choice.

    Absolute works, but then you also have to assign a z-index value to the search bar.

    /*Position of drop down menu*/
    nav#access
    {
    z-index:8888;
    position: absolute;
    }

    /*search bar position and size*/
    #branding .with-image #searchform
    {
    z-index:9999;
    }

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Twenty Eleven drop down menu sub menus not clickable’ is closed to new replies.