- This topic has 11 replies, 3 voices, and was last updated 4 years ago by
David.
-
AuthorPosts
-
April 26, 2019 at 11:16 am #880759
Martin
Hi
I have added a button to the nav bar.
Is it possible to have this show in the mobile menu as well?
Many thanks
Martin
April 26, 2019 at 12:55 pm #880835David
StaffCustomer SupportHi there
do you want the menu item inside the mobile dropdown to look like a button or in the mobile header itself beside the hamburger menu?
April 26, 2019 at 1:00 pm #880837Martin
Hi David
Yes, I wanted it to show in the mobile dropdown. I have disabled the links in the desktop and tablet view but I wanted it to be clickable in the mobile version.
I have added this but it doesn’t work.
@media (max-width:768px) { .main-navigation .main-nav ul li.nav-button a { border: 1px solid #34343c !important; border-radius: 5px; line-height: 35px; }
Many thanks
Martin
April 26, 2019 at 1:14 pm #880852David
StaffCustomer SupportCheck you CSS. The media query you have before that CSS is missing the closing
}
which is stopping that from working.You will need to add some
margin: 0 20px 10px;
and maybetext-align: center;
to make it look more button likeApril 27, 2019 at 11:15 am #881647Martin
π perfect, thank you David.
Is it possible to add the word ‘Call’ in front of the phone number, just on mobile.
Thanks again.
Cheers
Martin
April 27, 2019 at 1:22 pm #881709Leo
StaffCustomer SupportYou can try adding 2 buttons, one with the word Call and one without, then use the built-in
hide-on
classes to hide one on mobile and one on desktop/tablet:
https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classesLet me know if this helps π
May 4, 2019 at 6:20 am #888748Martin
Thanks Leo – that’s done it. Cheers.
May 5, 2019 at 6:00 am #889517Leo
StaffCustomer SupportNo problem π
May 6, 2019 at 2:59 am #890343Martin
Hi
I have just reapplied this fix – https://generatepress.com/forums/topic/different-logos-on-different-with-sticky/#post-875175
to deal with the two different logos on the site and it appears to have removed the button styling on the mobile menu.
The code I am using is
@media (max-width:768px) { .main-navigation .main-nav ul li.mob-nav-button a { border: 3px solid #34343c !important; margin: 0 60px 20px !important; text-align: center; border-radius: 5px; line-height: 35px; } }
Do I need to change this due to the fix on the menu logo’s?
Many thanks
Martin
May 6, 2019 at 4:00 am #890396David
StaffCustomer SupportIt’s the first media query that you have that is not closed with
}
so all other media queries below it are failing. I have cleaned up the CSS and merged the same media querys – so you can replace your simple css with this:.menu-toggle { font-size: 18px; } @media (min-width:769px) { .inside-navigation { padding: 0px 40px; } .mbg-service-link a:hover { color: #364b9b; } .dt-service-link a:hover { color: #a5c723; } .widget-title { font-weight: 500; } ::-moz-selection { background-color: #364b9b; color: #fff; } ::selection { background-color: #364b9b; color: #fff; } .main-navigation .main-nav ul li.nav-button a { border: 2px solid #ffff; border-radius: 5px; color: #ffff !important; pointer-events: none # !important; cursor: context-menu !important; line-height: 35px; } .main-navigation.navigation-stick .main-nav ul li.nav-button a { border: 2px solid #34343c; border-radius: 5px; color: #34343c !important; cursor: context-menu !important; line-height: 35px; } } @media (max-width:768px) { .main-navigation .main-nav ul li.mob-nav-button a { border: 3px solid #34343c !important; margin: 0 60px 20px !important; text-align: center; border-radius: 5px; line-height: 35px; } }
May 6, 2019 at 7:24 am #890732Martin
Thanks David. Appreciate your help. Cheers Martin.
May 6, 2019 at 7:44 am #890756David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.