简体   繁体   中英

prestashop fixed menu after scrolling issue

I have fixed top menu and titlecart dropdown menu issue. When I am on my website before I scroll it down titlecart have correctly dropdown, please check picture below 在此处输入图片说明

but when I scroll down and my fixed menu stick to the top and I want to come back and check a cart again title cart look like this: 在此处输入图片说明

search form cover titlecart drop down, I know that there is a problem with Z-Index, I tried to find solution everywhere and couldn't find any results. If someone had simmilar issue and know what to do let me know please.

For more information I will add my website

Please let me know if something more is needed to check the issue. Thanks!

Fix: global.css

# 5552 z-index: 0;

Fix: blockcart.css

# 136 z-index: 1031;

You have to set a higher z-index to your header-container element I found that z-index of 10000 works in your case.

.header-container {
    z-index: 10000;
}

Update

As sarcom suggested in the comments, you need to manage the z-indexes in your website so they don't get out of hand and you don't run into similar problems.

Here is a good article on the topic of z-index management: https://medium.com/science-journal/z-index-organization-in-css-5913fd4c25c9

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM