Streaming live at 10am (PST)

[TUTORIAL] Make mobile menu SCROLLABLE


#1

Hello guys and girls :slightly_smiling:

Many of us been in the situation when we have a fixed navigation with too many nav-links in the menu, so they are not all visible on mobile device screens. And at this point, we want to have our menu be scrollable. So how to do this?

Solution will depend on the Menu opening type, that you choose in the Navigation settings

NOTE: All these tips make sense only for fixed navigation!

1. DROP DOWN menu

This Solution is easiest. All you have to do is give the nav-menu a fixed height and set it overflow: auto


2. Over Right & Over Left (menu slides out from the right or left side)

In this type of the menu we will have to use some tricky step and DO NOT CHANGE overflow and height settings of the nav-menu.

1) Add a div inside the nav-menu and give it a class (I call it "scroll-wrap")
2) Give this div some fixed height and set overflow: auto
3) Add link-blocks+text or just text-links into the scroll-wrap div and style them as a nav-links (because standard nav-links have pre-defined settings, which do not let to move them anywhere.)



Good luck with your projects :slight_smile:

Best regards,
Anna


Nav Menu not fully visible on mobile device
Problem scrolling long menus on mobile
Scrollable Sticky Mobile Menu
Mobile nav scrollable when open?
Need to make nav into scroll for mobile
Mobile Menu Chopped off On Mobile Devices
Left scroll menu not scrolling
Left scroll menu not scrolling
Mobile Navigation drop down menus cutting off
Scrollable nav and dropdown menu in mobile
Side navigation - MENU not scrolling on smaller devices (esp mobile landscape)
Fixed Navigation Pane won't scroll overflow links
Menu scrolling problem on mobile devices
#2

Thanks @sabanna :clap:


#3

This isn't working for me, I can't move my nav links into the Scroll-wrap div...... Help?:tired_face:

Ohhh I see your comment about link block plus text, would I then make these hidden on desktop and then make the navlinks hidden on tablet and mobile?


#4

@Sabanna okay I did this but it's not working for me... Any ideas as to why?

https://preview.webflow.com/preview/streets-of-orleans?preview=e531c17caa8792b9188023e17678629c


#5

Hello, @Quantumgo

Because of navbar at the top, which takes some space of the screen, in your case, you can make scroll wrap about 75-80vh.
Basically, navbar height + scroll wrap height should be 100vh.

Cheers,
Anna


#6

@Sabanna thank you you're a genius!! :raised_hands:


#7

This is awesome, thank you for this @sabanna!


#8

@sabanna okay so part of it works and part doesn't.... when I click on themes it won't scroll... but everything else does... I'm so confused!


#9

Yeah looks weird :confused: I will try to figure it out


#10

Ok, try to reduce font size for the links and remove option overflow: scroll from the dropdown list when it is open.


#11

@sabanna, again you're a genius! Thanks so much!


#12

Thanks @sabanna ! Been looking for this for a while now :smile:


#13

Hi Sabanna, I have this problem but don't know how to fix it? My site looks good on mobile devices but the menu isn't scrollable, what can I do to fix it? Followed your tutorial but I don't think it works on Wordpress.

I would appreciate it if you could help!

Anis


#15

@sabanna

Is the menu display ok on Safari when you set 100vh for the height?

Thank you by advance,

Take care


#16

Hi, @Anis_Chity

I am not sure I understand your question about Wordpress. Do you mean that this settings doesn't work after you transfer your site to Wordpress?

Best,
Anna


#17

Hi @sabanna, Thanks for putting this tutorial together! This is exactly what I am trying to do. I tried what you suggested for the "Over Right" menu (creating "scroll-wrap" div and custom links, etc), but it's not working for some reason. As you'll see, my menu and the page content behind it still scroll. I would like to make it so only the menu scrolls and it's only the height of the content inside it.

Would you mind taking a look and seeing if I missed something? Here's the read-only link to the site: https://preview.webflow.com/preview/structures-brewing?preview=5ff8ce158cf7f177cd5e2bedca081522

Thanks so much!


#18

Hi, @caseydb

All you need is set navbar to position: fixed for the devices where you have "hamburger" button. :slight_smile:

Cheers,
Anna


#19

@sabanna, thank you so much! I did that and it worked. :smile: I really appreciate you taking the time to help me.

Is there a way to stop the website scrolling behind the navbar? I read another forum post on this here, but I was not able to get it to work.


#20

For that, you will need to make several changes

1.

Inside the interaction "Mobile Menu Fade In" change 2 steps, that affect mobile_menu_icon and mobile menu x`:
a) change trigger from "Click" to "Navbar"
b) add steps that make that icons display:none - Display: block

2.

Add script snippet to your existing custom code:

3.

I hardly recommend moving all that custom code to the "Site settings" level (not Page settings). Then it will affect all pages, even dynamic, and you don't have to repeat it on every page


#21

I got it working a while ago, but forgot to say "thank you". So, thank you @sabanna! :slight_smile: