Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
hi
anyone could help me to decrease the size of my navigation section with css code:
Hi Mathieulenoir,
What theme are you using? or can you share a link to your site so we can look at the code and tell you.
Regards
Danny
Hi Mathieulenoir,
First: Fix your code, this <h1> should NOT be where the navigation is (screen shot below). I would recommend you remove it and just place it below the banner or in the banner.
Secondly: to increase / decrease the height, in the screen shot you can see where the arrow is, just above it you have padding:2rem, if you increase the padding example 2.5rem it'll increase the height and vice-versa.
Regards
Danny
thank you so much for your help! fixed!
Excellent, try and also move the <h1> issue outside of the navigation as well.
Go to your Online store > Themes > Edit code > open theme.liquid file, add this code below under <head> element
<style>
.shopify-section-group-header-group .nav-header { margin: 0; }
.shopify-section-group-header-group > div { padding: 4px 0 !important; }
</style>
- Helpful? Like & Accept solution! - Support me? Buy me a coffee
- Ryviu - Product Reviews & QA app: Collect customer reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Dhgate and CSV.
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...Sign up now.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025