• Resolved jqz

    (@jqz)


    In Twenty Fourteen theme, sub menu items have fixed width. This means longer text overflows catastrophically, and shorter text has unnecessary space.

    https://stackoverflow.com/questions/13903929/how-to-set-css-width-equal-to-length-of-longest-text indicates a solution, however I have so far been unable to adapt (copy/modify) the theme to fix the issue.

    I am stuck, as the width of the main menu items is constraining that of the sub-menu and I’ve no idea why. It doesn’t in the link above, so the issue is clearly solvable…

    Hopefully someone has already had this issue. Why is the sub-menu width restricted that of the parent item in “2014” whilst it isn’t in the example above? What am I missing?

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

    (@jqz)

    Anyone?

    Thread Starter jqz

    (@jqz)

    After many hours drilling down, I figured it was probably this that was needed:


    .primary-navigation .menu-item-has-children ul li a,
    .primary-navigation .page_item_has_children ul li a {
    display: block;
    }

    There are a few other changes needed – I added ‘width: 100%’ to ‘.primary-navigation li li’ and removed the predefined widths in two places. If anyone wants more detail please ask.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sub menu item width’ is closed to new replies.