jQuery UI Slider overlap slidebar
jQuery UI Slider overlap slidebar
I use a slider range (jquery ui) and a side navigation bar (w3 school).
The handler of the slider range overlap the side navigation bar when it extend.
css of the side bar:
/* ~~~~~~~~~~~~~~~~~~~~~~ SIDENAV ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
.sidenav
height: 100%;
width: 0;
position: fixed;
z-index: 1;
top: 0;
left: 0;
background-color: #111;
overflow-x: hidden;
transition: 0.5s;
padding-top: 60px;
.sidenav a
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #818181;
display: block;
transition: 0.3s;
.sidenav a:hover
color: #f1f1f1;
.sidenav .closebtn
position: absolute;
top: 0;
right: 25px;
font-size: 36px;
margin-left: 50px;
@media screen and (max-height: 450px)
.sidenav padding-top: 15px;
.sidenav a font-size: 18px;
No Overlap: When the handler is not in the same plan as the navigation bar
Overlap: When the handler is in the same plan as the navigation bar
What can be the cause of this overlapping?
try increasing 'z-index' of your sidebar.
– Sachin Bhandari
Sep 2 at 13:02
Put the smallest example of working code in place so we can see it in action rather than just images.
– Mark Schultheiss
Sep 2 at 13:44
1 Answer
1
The solution was given in the comment section.
The solution is to raise the z-index of the sidebar.
.sidenav
height: 100%;
width: 0;
position: fixed;
z-index: 10;
top: 0;
left: 0;
background-color: #111;
overflow-x: hidden;
transition: 0.5s;
padding-top: 60px;
As the sidebar should always be on top, maybe rise it to a high value to never have this problem.
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Could you show your html as well?
– Ray
Sep 2 at 12:36