- This topic has 10 replies, 2 voices, and was last updated 6 years, 2 months ago by
David.
-
AuthorPosts
-
January 16, 2020 at 4:42 am #1133912
Sílvia
Hello,
I’m working in the mobile version of a website and I would like the menu not to be hamburger style.
The menu has just 5 words (without a submenu) and I would like it to be like a desktop menu under the header in just one line. It could be with the text a bit smaller or with a shorter space between each of the words or titles if necessary.
Can you please help me with it?Thanks in advance,
SilviaJanuary 16, 2020 at 6:45 am #1133990David
StaffCustomer SupportHi there,
you can add some CSS like this:
@media(max-width: 768px) { .main-navigation .menu-toggle { display: none !important; } .main-navigation ul { display: block !important; } .main-navigation .main-nav ul li a { padding-left: 5px; padding-right: 5px; font-size: 12px !important; } }You can see i have put the font-size down to 12px and reduced the space between items to 10px (combined) – and they all fit on one line on my iPhone 7+ but not smaller phones – however Google will most likely penalise you’re site for:
1. Text too small
2. Clickable items too close together.So it may not be the best idea if it makes the site less accessible.
January 16, 2020 at 8:58 am #1134273Sílvia
Thanks for your advice and your help, David. This is my husband’s Website
so, I’ll comment what you told me about Google and I’ll let him decide what to do.
The CSS code you gave me works perfectly, I’ve just changed the size of the text to 13px and the padding in the list to 10px (left and right) in order to have it in two lines even in smaller mobile devices.
Now, there is just one thing that doesn’t work:
I want the sticky navigation only on desktop, but I realize that the menu is still visible on mobile. Any idea of what can I do?Thank you,
SilviaJanuary 16, 2020 at 9:16 am #1134292David
StaffCustomer SupportIn Customizer > Layout > Sticky Navigation you can change it to apply only on Desktop.
January 16, 2020 at 10:40 am #1134370Sílvia
It’s done this way but it still doesn’t work.
January 16, 2020 at 10:47 am #1134371Sílvia
January 17, 2020 at 3:13 am #1134836David
StaffCustomer SupportWhat happens if you Disable the Sticky Navigation ?
January 17, 2020 at 3:41 am #1134856Sílvia
It works perfectly on mobile (there isn’t sticky navigation anymore) but it isn’t on desktop either, which is something that I’d like it to be there.
Silvia
January 17, 2020 at 4:25 am #1134893David
StaffCustomer SupportLeave the Sticky Navigation disabled and add this CSS:
@media (min-width: 769px) { .main-navigation { position: -webkit-sticky; position: sticky; top: 0; } }January 17, 2020 at 11:54 am #1135472Sílvia
That’s perfect!
Thanks a lot,
SilviaJanuary 18, 2020 at 1:54 am #1135787David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.