Hi, id like to reduce header height while keeping all elements alignment unchanged. Could anyone help me out with CSS code?
div#shopify-section-sections--20996792516941__header {
padding: 5px !important;
}
Go to online store ----> themes ----> go to three Dots ----> edit code ---->find theme.liquid files ----> place the code ---->
under the tag before the body ----->
if this code work please do not forget to like and mark it solution
Hi @JustinasR , you can follow these steps:
Step 1: Open Online Store → Themes → Edit code.
Step 2: Find component-card.css file
Step 3: Paste this code at the bottom of the file
@media screen and (min-width: 768px) {
.shopify-section.shopify-section-group-header-group.site-header {
padding: 10px 0 !important;
}
}
If this is helpful, please let us know by giving us a like and marking it as a solution. Thank you ![]()
Hey @JustinasR
Follow these Steps:
-
Go to Online Store
-
Edit Code
-
Find theme.liquid file
-
Add the following code in the bottom of the file above tag
RESULT:
If I managed to help you then, don’t forget to Like it and Mark it as Solution!
Best Regards,
Moeed
That didnt work. https://7go3k7v5sc19cstt-77830390093.shopifypreview.com
Hello @JustinasR
Go to online store ----> themes ----> actions ----> edit code ----> assets ----> styles.header.css
add this code at the end of the file and save.
.isDesktop:not(.isMobileMenu) .site-header {
padding: 0px !important;
}
result
If this was helpful, hit the like button and accept the solution.
Thanks
Thanks that worked!
Thank you for your reply. I’m glad to hear that the solution worked well for you. If you require any more help, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated.




