Site logo

Archived topic

Responsive Header Side Padding

9 replies · Started by Brent Wilson on March 23, 2022

Viewing posts 1–10 of 10

See below

Hi Brent,

This is the expected behavior. You would need custom CSS to override the default padding on sticky for mobile:

nav#sticky-navigation {
    padding-left: 30px;
    padding-right: 30px;
}

The same goes for the menu padding on desktop:

.menu-bar-items > span.menu-bar-item > a {
    padding-left:0;
    padding-right:0;
}

If you also wish to adjust the menu padding on mobile:

nav#sticky-navigation .menu-toggle {
    padding-left: 0;
    padding-right: 0;
}

button.menu-toggle {
    padding-right:30px;
}

You can also try modifying this through Appearance > Customize > Layout > Primary Navigation: https://share.getcloudapp.com/KouArGk8

Here is an article with regards to adding CSS: https://docs.generatepress.com/article/adding-css/#additional-css

Adding it through additional CSS should work.

Hope this helps! :)

Hi Brent,

Can you confirm if the Loom link was uploaded completely? It seems to stop loading at some point.

Hope to hear from you soon. :)

Thank you Brent! I was able to watch the video now. With that said, you would need a little custom CSS to achieve the tweaks mentioned.

Here is a code you may try:

nav#generate-slideout-menu.is-open > div {
    padding-left: 30px;
}

@media (max-width: 768px) {
    /* CSS in here for mobile only */
    nav#sticky-navigation.is_stuck {
    padding-left: 30px;
    padding-right: 30px;
}

nav#sticky-navigation.is_stuck .inside-navigation  .menu-toggle {
    padding-right: 0;
}

nav#sticky-navigation.is_stuck .navigation-branding {
    margin-left:0;
}
}

Here is an article with regards to adding CSS: https://docs.generatepress.com/article/adding-css/#additional-css

Adding it through additional CSS should work.

Hope this helps! Kindly let us know how it goes. :)

Great! That CSS appears to have resolved both issues that I brought up in the video! Thanks!

You’re welcome Brent! Glad that worked! Feel free to reach out anytime if you’ll need assistance with anything else. :)

This archived topic is closed to new replies.