'How to resolve sidebar disappear on page scroll mobile
When the web page is scrollup on mobile, the side bar disappear Please help with some solution
Solution 1:[1]
Please provide all your code so everyone will be able to help you out here. This community needed your code to assist you on all your need. I have a simple sample here below but this is just an example solution on what I think you need. but please provide your code.
nav {
height:50px;
background-color:black;
position:fixed;
top:0;
right:0;
left:0;
}
.wrapper {
display:flex;
margin-top:50px;
}
.sidebar {
float:left;
background-color:pink;
left:0;
width:300px;
}
main {width:100%;
height:1000px;
background-color:lightblue;
}
@media only screen and (max-width:479px){
.sidebar {position:fixed;}
}
<nav>
This is my nav
</nav>
<div class="wrapper">
<div class="sidebar">
<div>
link1
</div>
<div>
link2
</div>
<div>
link3
</div>
</div>
<main>
This is the main body
<h1>Scroll Me on Mobile Sidebar will be fixed</h1>
</main>
</div>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Crystal |
