- This topic has 9 replies, 2 voices, and was last updated 2 years ago by Fernando.
-
AuthorPosts
-
April 12, 2022 at 4:57 pm #2186915Brent Wilson
Can I get some help figuring out how to fix the side spacing on a navigation as header? I want the left and right padding to be at 30 px on all devices and on both sticky and normal.
The site I’m dealing with is: https://wordpress-483838-2431328.cloudwaysapps.com/
Please watch this Loom video for a walkthrough of what I am dealing with: https://www.loom.com/share/505f0d10202b4245832bba08afa05379
April 12, 2022 at 5:43 pm #2186925Fernando Customer SupportHi Brent,
With your current structure, here is a CSS you may try adding to Appearance > Customize > Additional CSS:
ul.menu li.menu-item a { padding: 0 20px; } @media (max-width: 1024px) { /* CSS in here for tablet only */ .main-navigation .inside-navigation.grid-container>* { margin-left:0 !important; margin-right:0 !important; padding-left:0 !important; padding-right:0 !important; } .main-navigation > .inside-navigation.grid-container { padding-left:30px !important; padding-right:30px !important; } .navigation-branding p.main-title { margin-left:0; } }
Hope this helps! Kindly let us know how it goes. ๐
April 12, 2022 at 8:00 pm #2186995Brent WilsonOkay, great! That seemed to resolve those issues. A couple more things:
Please watch this Loom video: https://www.loom.com/share/a05fc5f45009456ba2d15f82efce8fdd
URL to page with weird flicker issue (see video): https://wordpress-483838-2431328.cloudwaysapps.com/camp-meetings/
April 12, 2022 at 8:27 pm #2187005Fernando Customer SupportHi Brent,
Try this CSS instead:
ul.menu li.menu-item a { padding: 0 20px; } @media (max-width: 1024px) { .main-navigation .inside-navigation.grid-container>* { margin-left:0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; } .main-navigation > .inside-navigation.grid-container { padding-left: 30px !important; padding-right: 30px !important; } .navigation-branding p.main-title { margin-left: 0; } ul.menu li.menu-item a { padding: 0; } ul.menu li.menu-item { padding: 0 30px; } .both-sticky-menu .main-navigation:not(#mobile-header).toggled .main-nav > ul { z-index: 10000; } }
I added a
z-index
value in the new code. The flickering issue was occurring because you have link elements in your body with az-index
of999
, similar to thez-index
of the main-menu. Basically, they are on the same plane, causing the issue. I increased thez-index
of your main-menu to avoid this issue.Hope this clarifies. ๐
April 12, 2022 at 8:44 pm #2187019Brent WilsonThat seems to work well.
Just a bit more to get this menu stuff all perfected!
On this page, I have an element applying CSS to change the color of the menu and such: https://wordpress-483838-2431328.cloudwaysapps.com/camp-meetings/2021-camp-meeting/
The following CSS is there to make the hover color change on the hamburger menu icon. But I have added the word “MENU” as a mobile menu label, and it is not changing to the hover color on hover. How do I include that?
.menu-toggle:hover .gp-icon svg { fill: #e7e7e7; }
April 12, 2022 at 9:32 pm #2187042Fernando Customer SupportTry this:
button.menu-toggle:hover .icon-menu-bars > * { fill: rgb(255,0,0); }
Kindly let us know how it goes. ๐
April 12, 2022 at 9:39 pm #2187047Brent WilsonThat seems to be targeting the hamburger menu icon. But the CSS I sent you in my previous comment was already doing that. But it is still not targeting the mobile menu label.
April 12, 2022 at 10:12 pm #2187055Fernando Customer SupportSorry, I misunderstood.
Try this if you want to modify the color of โMENUโ:
button.menu-toggle span.mobile-menu { color:rgb(255,0,0); }
Kindly let us know how it goes. ๐
April 12, 2022 at 10:22 pm #2187059Brent WilsonOkay, I was able to add
hover
to that, change the color, and achieve what I was trying to achieve. Thanks!April 12, 2022 at 10:32 pm #2187070Fernando Customer SupportOh yeah, sorry, I forgot about the
hover
. Glad you sorted it out though! Feel free to reach out anytime youโll need assistance with anything else. ๐ -
AuthorPosts
- You must be logged in to reply to this topic.