Adjustments to Header

JoeyRoo
Excursionist
45 0 5

Hi, 

 

I am looking for some code that will make the header width more narrow when a visitor hovers over the menu or starts scrolling down the page. Basically when the header turns white and the logo changes from white to black, I want the logo to get smaller and the width of the header to also shrink down. Not sure if this is possible.

Replies 5 (5)

Made4uo-Ribe
Shopify Partner
5370 1296 1587

HI @JoeyRoo 

Check 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:

 

section#shopify-section-template--14973500751974__image_banner_FKURpq {
    max-width: 130rem;
    margin: auto;
}

 

And Save. 

Result:

Made4uoRibe_0-1711044787596.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


JoeyRoo
Excursionist
45 0 5

I do not have base.css, style.css or theme.css. I tried putting this in app.css, but the code did not work

Spac-es
Shopify Partner
327 96 109

Add this code in your app.css file:

.is-sticky .logolink img {
  max-height: 80px;
}

Result:

 

result.PNG

 

 

JoeyRoo
Excursionist
45 0 5

This does not seem to be working

Spac-es
Shopify Partner
327 96 109

 

Add !important like this; it overrides any additional styles from your page that might prevent it from being applied correctly.

.is-sticky .logolink img {
  max-height: 80px !important;
}