- This topic has 9 replies, 2 voices, and was last updated 3 years, 3 months ago by
Fernando.
-
AuthorPosts
-
January 15, 2023 at 6:46 pm #2496786
Matthew
Hello,
After reading a few other forum posts regarding how to add a button to the mobile menu I’m still struggling with this.
Details shared in private information.
Cheers,
MatthewJanuary 15, 2023 at 7:13 pm #2496799Fernando Customer Support
Hi Matthew,
To, clarify, are you adding a button solely on mobile and not on desktop?
Also, in Appearance > Customize > Layout > Header, do you have Mobile Header turned on?
January 16, 2023 at 3:08 pm #2498117Matthew
Hi Fernando,
I’ve managed to add the button to the mobile header 🙂
However, can you please confirm if this CSS is correct as I would like the mobile CTA button to appear the in the same design as on desktop….
@media (min-width:769px) {
.main-navigation .main-nav ul li.nav-button a {
background-color: #f4941c;
border: 2px solid #f4941c;
color: #ffffff;
line-height: 35px;
}
#mobile-header .inside-navigation {
align-items: center;
}
background-color: #f4941c;
border: 2px solid #f4941c;
color: #ffffff;
line-height: 35px;
}Cheers
MatthewJanuary 16, 2023 at 6:05 pm #2498231Fernando Customer Support
Hi Matthew,
How are you adding it currently?
Note: If you use a Block Element – Hook, you shouldn’t need any custom CSS to alter its design.
January 16, 2023 at 6:29 pm #2498256Matthew
Hi Fernando,
I’ve shared an image of the code in the private comments sections.
In the Custom CSS this is the code I’ve been using for the design of the desktop button…
@media (min-width:769px) {
.main-navigation .main-nav ul li.nav-button a {
background-color: #f4941c;
border: 2px solid #f4941c;
color: #ffffff;
line-height: 35px;
}Cheers,
MatthewJanuary 16, 2023 at 7:29 pm #2498287Fernando Customer Support
I see.
Try adding this CSS for the mobile button:
a.button.my-custom-button { background-color: #f4941c; border: 2px solid #f4941c; color: #fff; line-height: 35px; } .mobile-bar-items:hover a { background-color: #424242; }January 16, 2023 at 7:42 pm #2498305Matthew
Thanks Fernando, just confirming I’ve added it correctly as per https://ibb.co/BcWqs9H
January 16, 2023 at 7:48 pm #2498314Fernando Customer Support
You added it inside a
@mediaquery for table and desktop views. It won’t work because of that. You need to place it outside of that@mediaquery.January 16, 2023 at 7:51 pm #2498317Matthew
Brilliant 🙂 Many thanks for your patience Fernando, it’s now working 🙂
January 16, 2023 at 7:56 pm #2498319Fernando Customer Support
You’re welcome, Matthew! 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.