New Shopify Certification now available: Liquid Storefronts for Theme Developers

Sticky header padding

Solved
Gypsymoon
Explorer
88 0 14

 Hi,

I’m currently customizing a new theme, “Broadcast”. It has the option for sticky heady but when I scroll the header is quite big and has lots of black space around my logo. Is there any way of reducing the size?

 

https://tclboiu0mudq1ywh-8439839.shopifypreview.com

IMG_1501.jpeg

Accepted Solution (1)
Made4uo-Ribe
Shopify Partner
4243 980 1196

This is an accepted solution.

Hi @Gypsymoon 

Try this one. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

@media only screen and (max-width:989px){
.shopify-section-header-sticky .header {
    padding-top: 0rem !important;
    padding-bottom: 0rem !important;
}
}

 

  • And Save.
  • Result:
  • Made4uoRibe_0-1698618730397.png

     

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


View solution in original post

Replies 4 (4)
theycallmemakka
Shopify Partner
993 201 213

Hi @Gypsymoon ,

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
@media only screen and (max-width: 600px) {
     .header__heading-logo {
        max-height: 60px;
    }
}
</style>

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,

Makka

❤️❤️

Buy me a coffee


For quick response - Message Me


Increase Xmas sales with BOGO+ Easy Free Gift Upsell. Get 30% OFF for 3 months with code "BFWIZZ30".

PageFly-Richard
Shopify Partner
3678 807 1455

Hi @Gypsymoon 

This is Richard from PageFly - Shopify Page Builder App, I’d like to suggest this idea:
Online Store ->Theme ->Edit code
Assets ->Base.css

.header__heading {
    margin: 0;
    line-height: 0;
}

Hope you find my answer helpful!
Best regards,
Richard | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

Made4uo-Ribe
Shopify Partner
4243 980 1196

This is an accepted solution.

Hi @Gypsymoon 

Try this one. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

 

@media only screen and (max-width:989px){
.shopify-section-header-sticky .header {
    padding-top: 0rem !important;
    padding-bottom: 0rem !important;
}
}

 

  • And Save.
  • Result:
  • Made4uoRibe_0-1698618730397.png

     

Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


Gypsymoon
Explorer
88 0 14

Thank you so much! That worked!