Moving menu up menu & logo applies for landing page but not for other pages (e.g. product pages)

Moving menu up menu & logo applies for landing page but not for other pages (e.g. product pages)

Frede
Excursionist
33 0 5

Dear all,

 

I'm using this code at the end of theme.liquid to move up the main menu and the shop logo (Dawn Theme):

 

 

 

 <style>
.header:not(.drawer-menu).page-width{
    position: relative;
    top: -30px;
}
.header:not(.drawer-menu).page-width>.header__heading {
    top: 30px !important;
    position: relative
}
</style>

 

 

 

This working perfectly on the landing page. However, on all other pages (e.g. product pages) the second part of the code (that moves down again the logo relatively to the position of the menu) seems to be not applied. That results in a logo position that is too high.

 

The logo should have this position (landing page): https://bhgfrp-rx.myshopify.com/

On this product page the position of the logo is too high: https://bhgfrp-rx.myshopify.com/products/eloo%C2%AE-ligneo-trenntoilette-kopie

 

How can I change the code in a way, that the logo position is affected on all pages equally?

 

Thanks a lot for your support!

 

Fred

Replies 2 (2)

Dan-From-Ryviu
Shopify Partner
11376 2231 2404

Please try to update code to this and check again

 <style>
.header:not(.drawer-menu).page-width{
    position: relative;
    top: -30px;
}
.header:not(.drawer-menu).page-width>.header__heading-link {
    top: 30px !important;
    position: relative
}
</style>

- Found this helpful? Hit "Like" and "Accept as Solution"! Support me: Donate!
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image - Gain customers with photo gallery, video & shoppable image
Built for Shopify

Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- En...
Sign up now.

Frede
Excursionist
33 0 5

Thank you so much Dan-From-Ryviu!

 

The code you posted was reacting the other way around: it was affecting the product pages but not the landing page. I combined both codes and now it's perfectly working:

 

<style>
.header:not(.drawer-menu).page-width{
    position: relative;
    top: -30px;
}
.header:not(.drawer-menu).page-width>.header__heading {
    top: 30px !important;
    position: relative
}
.header:not(.drawer-menu).page-width>.header__heading-link {
    top: 30px !important;
    position: relative
}
</style>