I'm a beginner in this topic, currently working with Vue and CSS. I've managed to create a responsive menu, but I'm facing difficulty in implementing scroll only for the drop-down menu.
The issue I'm encountering is that when I scroll, the entire page moves instead of just the menu dropping down. This behavior is not what I want. I want only the menu to scroll without affecting the rest of the page.
https://i.sstatic.net/0SMjo.png
As shown in the image above, I specifically want to enable scrolling within the red rectangle (Menu). I've searched online for solutions but haven't been successful in making it work.
@media (max-width: 828px) {
#menu-header.show {
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
#accordion-mbl-menu {
margin: 0;
.panel {
// CSS rules here
}
}
.login-section {
// More CSS styles
}
}
}
Here's my Vue code:
<div id="menu-mobile-cats" class="scrollbar-outer scroll-content scroll-scrolly_visible">
<div class="panel-group" id="accordion-mbl-menu">
<div class="panel">
// HTML structure here
</div>
</div>
</div>
If anyone could provide an example or assist me in resolving this issue, it would be greatly appreciated. As mentioned earlier, I am still learning and would benefit from some guidance on this matter.