- This topic has 14 replies, 5 voices, and was last updated 3 years, 11 months ago by
Ying.
-
AuthorPosts
-
June 13, 2021 at 2:45 pm #1820940
Austin
Hi,
How can I adjust the left and right padding for the header / navigation menu when using “use navigation as header”? It takes away the padding options. Also mobile as well as it inherits the desktop padding.
Thanks,
June 13, 2021 at 3:54 pm #1820962Leo
StaffCustomer SupportHi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know 🙂
June 13, 2021 at 4:02 pm #1820963Austin
June 13, 2021 at 10:25 pm #1821096Elvin
StaffCustomer SupportHi Austin,
When you enable “use navigation as header” option, the padding used by the Navigation is the one set on Appearance > Customize > Layout > Container. It uses the Content padding values.
But the problem is, it shares the setting with the page content’s padding.
If you wish to assign separate padding for the Navigation Header, we’ll have to do it with custom CSS.
That said, Can you specify which part of the header you want to place padding on?
June 14, 2021 at 7:05 am #1821540Austin
Hey Elvin,
Yeah understood. I like the layout options when not using “use navigation as header” but then it creates a “search box” with a blue outline on mobile when the search icon is engaged and doesn’t look right. Using “use navigation as header” seems to be the only way to get around that issue on mobile.
I just want to be able to adjust the padding on the left of the logo and the right of the main menu. It is to spread out and I want to bring both sides back in slightly.
Thanks
June 14, 2021 at 9:36 am #1821879Ying
StaffCustomer SupportHi Austin,
In this case, try this CSS:
@media (max-width: 800px) { .inside-navigation { padding-left: 20px; padding-right: 20px; } }Please be noted that the
800pxis to match the mobile break point you set in the customizer.June 14, 2021 at 9:48 am #1821888Austin
Hi Ying, I tried that but there was no change in padding. Thanks
June 14, 2021 at 10:38 am #1821939Ying
StaffCustomer SupportJust to make sure you are trying to add paddings to the header on mobile?
I don’t see it’s been added to your site, the CSS should work:
https://www.screencast.com/t/dCQU4hsxDo you have any cache plugins activated? If so, could you clear the cache after the CSS is added?
Let me know if I miss anything 🙂
June 14, 2021 at 10:45 am #1821944Austin
Hey Ying, I am trying to add padding to the desktop version.
June 14, 2021 at 10:46 am #1821946Austin
The CSS has been added in the “Customize” Additional CSS area
June 14, 2021 at 10:59 am #1821959Ying
StaffCustomer SupportAh sorry I missundertood your question, in this case, the CSS should be this:
@media (min-width: 801px) { #site-navigation .inside-navigation { padding-left: 20px; padding-right: 20px; } }June 14, 2021 at 11:09 am #1821967Austin
No problem Ying. That worked. Thanks
June 14, 2021 at 11:16 am #1821978Ying
StaffCustomer SupportYou are welcome 🙂
Glad it worked!
July 4, 2022 at 9:58 am #2272964Geoffrey A.
Hi, thanks for the CSS info. It works great. Could you tell me how to make it work also when activating the sticky navigation?
July 4, 2022 at 10:22 am #2272987Ying
StaffCustomer SupportHi Geoffrey,
You can try replacing
#site-navigation .inside-navigationwith#site-navigation .inside-navigation, #sticky-navigation .inside-navigation -
AuthorPosts
- You must be logged in to reply to this topic.