• Resolved jessdvs

    (@jessdvs)


    I’m trying to make my sub menu the full width of the page and I’ve seen using jquery is suggested in multiple locations. I’m fairly unfamiliar with jquery and was wondering if someone could give me a little more clarification.
    So, for example, my sub menu would ideally be the same width as .site-content and the class for the sub menu is .mega-sub-menu. Could you tell me how that code would look?

    https://wordpress.org/plugins/megamenu/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Looking for this as well.

    Actually – just found this.. the ‘Examples’ made me realize I was missing the hastags.

    https://www.maxmegamenu.com/documentation/faqs/adjust-sub-menu-width/

    Dynamic widths can be used to automatically aligned and size the sub menu to match an existing element on the page.

    To make use of this feature you’ll need to find the HTML element that wraps your page content and use the ID or class of the element (in the form of a jQuery selector) as Panel Width setting.

    For example: #container, body, #page, .content.

    Plugin Author megamenu

    (@megamenu)

    Hi Jess,

    It sounds like you need to enter “.site-content” as the Panel (Outer) Width in the theme editor.

    dglasgo, to target an element ID use #my_element, to target a class use .my_element. Hopefully that explains why you needed the hash, not the dot.

    Regards,
    Tom

    Thread Starter jessdvs

    (@jessdvs)

    Lovely, that helped immensely. I was thinking I needed to enter more extensive code in the actual .js file for the plugin. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sub Menu Full width’ is closed to new replies.