I have a transparent menu that is fixed at the top of the page and a menu with a white background that appears when scrolling up. However, when I make a fast swipe upwards on the mobile, the menu goes behind the container. Is there any way to fix this?
To fix the issue where the menu goes behind the container, you need to adjust the z-index of the menu that appears when scrolling. Ensure the scrolling menu has a higher z-index value compared to the other page elements. Additionally, set position: fixed; for the menu to keep it on top consistently:
.scroll-menu {
position: fixed;
top: 0;
z-index: 999; /* Set to a value higher than other elements */
background-color: white; /* To ensure visibility */
}
This should prevent the menu from getting hidden behind other content when swiping quickly.
If you have other questions, I am willing to answer them too.