Title: Using Relative Div for Button
Last modified: September 25, 2019

---

# Using Relative Div for Button

 *  Resolved [smalldetails](https://wordpress.org/support/users/smalldetails/)
 * (@smalldetails)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/using-relative-div-for-button/)
 * I’m happy to say I LOVE the functionality of this plugin. I had a working menu
   using a fixed button on this staging website: [Website](https://www.towson2.com)(
   PW: TOA2DHS ). Because the client wanted the button in a more visible spot for
   desktop (next to horiz menu) I moved it to within a div (you’ll see the new button
   location to the right of the red menu bar). This was done following this post:
 * [Topic link](https://wordpress.org/support/topic/can-i-place-the-menu-button-inside-a-div/)
 * It needs style-work for mobile, but I’ve got it where I need it for desktop, 
   AND the button triggers the menu panel BUT no menu is displayed. The last thing
   I did was to enable “Shortcode.” Before that clicking the visible shortcode string
   on the frontend opened the panel AND the menu. I can’t figure out what went wrong.
   This is our shortcode in a custom theme header:
 * <?php echo do_shortcode(‘[responsive_menu_pro menu_to_use=”menu-94″]’); ?>
 * I’ve gone through all of the plugin settings and tried switching to a different
   menu but haven’t had any luck. 
 * Did I miss something? It worked fine as a fixed button menu with no div and as
   a shortcode string/link IN a div <i>before</i> enabling shortcode. I would GREATLY
   appreciate any help you can offer.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fusing-relative-div-for-button%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [varunkumarsupport](https://wordpress.org/support/users/varunkumarsupport/)
 * (@varunkumarsupport)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/using-relative-div-for-button/#post-11970053)
 * Hi,
 * We are looking into the issue and will get back to you soon.
 * Have a nice day!.
 * Regards,
    Kriti
 *  [Peter Featherstone](https://wordpress.org/support/users/peterfeatherstone-1/)
 * (@peterfeatherstone-1)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/using-relative-div-for-button/#post-11970910)
 * [DELETED]
 *  [Peter Featherstone](https://wordpress.org/support/users/peterfeatherstone-1/)
 * (@peterfeatherstone-1)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/using-relative-div-for-button/#post-11970917)
 * Hey there,
 * I think the issue is that you have changed the Trigger to `#fullmenu`, however
   you have 2 elements with an ID of `#fullmenu` on the page which is invalid HTML
   and as such the JavaScript can’t trigger properly.
 * Is there a reason you are using that trigger? Changing it to a class may solve
   the issue or if not leaving it as the default is advisable.
 * I would always advise running your site through a HTML validator before going
   live as you can see using the tool below that your site has fatal HTML errors
   that are unrecoverable from at the moment and need fixing:
 * [https://validator.w3.org/nu/#textarea](https://validator.w3.org/nu/#textarea)
 * I hope that helps.
 * Peter
 *  Thread Starter [smalldetails](https://wordpress.org/support/users/smalldetails/)
 * (@smalldetails)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/using-relative-div-for-button/#post-11971261)
 * Thank you Peter, I changed it to a class but that alone didn’t work so I removed
   both header, nav containers from the equation, and left the 2 menus as standalone
   divs. Sounds crazy but it worked for some reason. Only problem now is that the
   trigger/button doesn’t switch to an “X” after it’s opened.
 * Mobile styles haven’t been created yet – desktop only.
    -  This reply was modified 6 years, 8 months ago by [smalldetails](https://wordpress.org/support/users/smalldetails/).
 *  Thread Starter [smalldetails](https://wordpress.org/support/users/smalldetails/)
 * (@smalldetails)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/using-relative-div-for-button/#post-11971282)
 * Just noticed the menu closes if you click on the “Back” link. I’m sure these 
   problems are on my end. This is a copy of a live site that has morphed over a
   decade. Any help is MUCH appreciated but there could be old js remnants I haven’t
   discovered yet.
 *  [Peter Featherstone](https://wordpress.org/support/users/peterfeatherstone-1/)
 * (@peterfeatherstone-1)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/using-relative-div-for-button/#post-11971548)
 * Hey there,
 * Can I ask why you are using a custom trigger and not sticking with the default
   of `#responsive-menu-pro-button`? I’m not quite following why you need a custom
   trigger here?
 * The menu itself is inside your custom trigger of `.fullmenu` so any clicks inside
   that (including on the menu container) will trigger the closing of the menu again.
 * It’s the custom trigger that is causing all the issues and I’m not sure why you
   are using one.
 * Please let me know
 * Peter
 *  Thread Starter [smalldetails](https://wordpress.org/support/users/smalldetails/)
 * (@smalldetails)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/using-relative-div-for-button/#post-11971567)
 * Oh geez, I SWEAR I tried going back to the default and the menu panel didn’t 
   open at all. Of course it’s working NOW… THANK YOU SO MUCH for the head slap!
 *  Thread Starter [smalldetails](https://wordpress.org/support/users/smalldetails/)
 * (@smalldetails)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/using-relative-div-for-button/#post-11971600)
 * I meant that with a smile on my face! I appreciate the help.
 *  [varunkumarsupport](https://wordpress.org/support/users/varunkumarsupport/)
 * (@varunkumarsupport)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/using-relative-div-for-button/#post-11973938)
 * We are glad that everything is working for you now.
 * Regards,
    Kriti

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Using Relative Div for Button’ is closed to new replies.

 * ![](https://ps.w.org/responsive-menu/assets/icon-256x256.png?rev=1782326)
 * [Responsive Menu - Create Mobile-Friendly Menu](https://wordpress.org/plugins/responsive-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/responsive-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/responsive-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/responsive-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/responsive-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/responsive-menu/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [varunkumarsupport](https://wordpress.org/support/users/varunkumarsupport/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/using-relative-div-for-button/#post-11973938)
 * Status: resolved