[Tips & Scripts] Mobile Hamburger Navigation Menu



Building on the Sticky Navigation Bar Community Post, this tutorial shows you an easy way to take your navigation bar in Unbounce and make it mobile friendly.

The benefit of doing this is to give your users a way to quickly navigate your mobile landing page while allowing them to jump to the form at any time.

See this effect in action here (view on mobile):

How to Install in Unbounce

Click Here for Instructions

:rotating_light: WARNING: YOU ARE ENTERING DEVELOPER TERRITORY :rotating_light:
This is not an official Unbounce feature. This functionality is based entirely on third party code, and has only been tested in limited applications. Since this isn’t a supported Unbounce feature, our support team will be unable to assist if things go awry. So if you are not comfortable with HTML, Javascript and CSS, please consider consulting an experienced developer.

:warning: Before We Begin…

If you don’t have your navigation bar set up yet, start here.

Download the Scripts

Grab the latest menu_box.css and  menu_toggle.js files here:

Optional: Download the .unbounce template

You can download the .unbounce file for this project here.


Step 1.
Copy your navigation bar box element in desktop, switch to the mobile editor, and paste the box on your page. This will be your mobile dropdown menu! Style to your liking.

Step 2.
Still in mobile, you will now want to hide the buttons in the original navigation bar and add your toggle button/image.

Step 3.
Switch to the desktop editor and hide the newly created dropdown menu box element.

Step 4.
Paste the menu_toggle.js Javascript code in the Javascript section with placement ‘Before Body End Tag’.

Step 5.
Replace “#lp-pom-image-120” with the ID of your toggle button/image from Step 2 and both instances of “#lp-pom-box-113” with the ID of your menu box created in Step 1.

Step 6.
Paste the menu_box.css CSS code in the Stylesheets section.

Step 7.
Replace “#lp-pom-box-113” with the ID of your menu box from Step 1 and the ‘top’ value with the pixel height of your original navigation bar.

Like anything else you implement on your page, you’re going to want to test this out thoroughly to see what effect (if any) it has on your conversion rates. We recommend running an A/B test and segmenting a small portion of traffic towards the page - just to be safe.

We’ve given you the ground work, but we would love to see how you implement this on your own pages. For example, maybe you choose to make your header fully transparent and only include a menu icon? This is your chance to get creative and show the Unbounce community how you’re using this.

Can’t see the instructions? Log-in or Join the Community to get access immediately. :rocket:

Want to take your Unbounce landing pages + Convertables™ to the next level?
:spinbounce: Check out the Ultimate List of Unbounce Tips, Scripts & Hacks

Sticky Mobile Nav + Hamburger Menu = odd bars in between header/section 1
Building drop-down header menus tutorial
The Ultimate List of Unbounce Tips, Scripts & Hacks
Microsite Mobile Menu?
Close button Problem on Mobile
Drop-Down Menu to Other Landing Pages
Hamburger Menu
Unbounce navigation bar?
Building drop-down header menus tutorial
[Tips & Scripts] Sticky Navigation Bar For Desktop - The Code Behind Our Call-To-Action Conference Page

Thank you for this, Noah! Excellent!



Thanks for the share, Noah!


Thanks Finge, glad you like it!


My pleasure Stefano!


Trying to implement this with a menu bar that is on the bottom of the page but on mobile, the entire menu box is just blank. I only know basic HTML/CSS so I don’t fully understand what’s going on here. Seemed like perhaps the hamburger icon needed to be outside the menu box but I did that and everything in that section is still blank.

Since the “support team will be unable to assist if things go awry”, was wondering if anyone else could help. The page is: http://www.ohpisi.com . I published the mobile version anyway since its better to have that without a menu than no menu at all.


Hi Trishan, this solution is meant to build on the Sticky Navigation Bar from Joel’s post here. I’d recommend going through that post first before trying to implement this solution. I hope this helps!


Hi Trishan, this solution is meant to build on the Sticky Navigation Bar from Joel’s post here. I’d recommend going through that post first before trying to implement this solution. I hope this helps!


Actually, I just realized the menu box was hidden on desktop as well so I went back to my original version without the hamburger… :confused:


I was trying to build it without the sticky nav bar because of the transparency but I now see why that won’t work. Thanks!


thanks for this - in the big picture this functionality SHOULD be an unbounce  widget - hopefully they are working on it.  Issues like this that are holding the product back…


Everytime I try to upload the file to my account is fails…


Hi Chris, 
You should be able to upload the .unbounce file into your account without issue. Go ahead and give these steps another try and if that doesn’t work, let us know. 


How do I create a dropdown menu box element?
And I cannot change my ID…

Please help!


Works perfectly, BUT my menu is loading open. Any idea why? Copied the JS code exactly…


USing this on mobile and desktop  - much cleaner than horizontal menu on dekstop


 display: none; has to be in your CSS for the box


Ooooh, that sounds slick AJ!


I cant get this to work for love nor money. This should be part of Unbounce and not have to hack

My menu does appear if  _remove  display: none;  but in the wrong place and once you click on the toggle, the whole menu vanishes

Update - worked it out_


My menu is not showing anything. Can you take a look to my page please ? 
Thanks !