- This topic has 10 replies, 3 voices, and was last updated 4 years, 6 months ago by
Leo.
-
AuthorPosts
-
September 28, 2021 at 12:22 pm #1946051
Andrew
Hello Again,
I have added some CSS to make my mobile menu toggle button have a red border, I like the way its styled with this effect. I’ve noticed that when I’m on a small enough screen such as a cell phone to see it, when I scroll down the toggle button changes to another style, I was wondering how I could make that one match how it looks before the page is scrolled down. For the CSS below I can change the background color, but it looks like it takes up the full height of the header, and also is aligned to the right with no margin.https://drive.google.com/file/d/1JX7fS8lhIPWQI15g3OfQEoLPKGBxCKrh/view?usp=sharing
.menu-toggle {
background:green!important;
}September 28, 2021 at 12:31 pm #1946064Leo
StaffCustomer SupportHi there,
Any chance you can link us to the site in question?
You can use the private information field:
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-informationLet me know 🙂
September 28, 2021 at 12:48 pm #1946080Andrew
Sorry forgot about that, please adjust the screen size enough to trigger the mobile menu, and scroll down a little until it sticks you will see what I’m referring to about taking up the full height, I made it green now so it was easier to see.
Then on it appears to fix itself, but when you scroll down it all the way aligned to the right. For this one would my best solution be margin-right 30:px; to match how it looks before scrollingSeptember 28, 2021 at 12:53 pm #1946084Leo
StaffCustomer SupportTry this selector for your existing CSS:
.main-navigation .menu-toggleSeptember 28, 2021 at 1:00 pm #1946098September 28, 2021 at 1:07 pm #1946104Andrew
Getting closer, however two things.
1). @ 1232px please look at the mobile menu, it takes up the full height of the navigation. This is after you scroll down it looks fine before that.
2). Mobile – Looks great before I scroll down, once I scroll down it shifts all the way to the right, almost like the container it’s in is different, I didn’t know if adding margin-right would be a good fix.September 28, 2021 at 1:11 pm #1946107Ying
StaffCustomer SupportTry this CSS:
#sticky-navigation .menu-toggle { margin-right: 30px; }September 28, 2021 at 1:16 pm #1946110Andrew
That worked great for item #2 now I’m just trying to figure out #1
September 28, 2021 at 1:21 pm #1946118Ying
StaffCustomer SupportCan you go to customizer > layout > primary navigation and reduce the menu item height?
Let me know if that works.
September 28, 2021 at 5:44 pm #1946231Andrew
What should I change it to in order to achieve a similar look?
September 28, 2021 at 7:14 pm #1946282Leo
StaffCustomer SupportTry something like this:
.sticky-navigation-transition .menu-toggle { line-height: 60px; } -
AuthorPosts
- You must be logged in to reply to this topic.