0
I’m trying to make a map with a navbar as per image:
Only when moving the image on the X-axis to see the rest of the content, the navbar also moves as the image
How do I enable scroll only on X-axis for map container div?
Follows css:
Map:
.mapa, .rota {
position: absolute;
height: 100%;
}
.mapa {
z-index: 1;
}
.rota {
z-index: 2;
}
Navbar:
nav{
display: flex;
height: 100%;
position: relative;
height: 70px;
background-color: rgb(75, 87, 100);
width: 100%;
border-bottom: 5px solid rgb(233, 128, 99);
}
.arrow-back{
width: 25px;
position: absolute;
left: 5%;
top: 50%;
transform: translateY(-50%);
}
.nav-search {
flex-direction: column;
}
Is your goal that the navbar is always visible, regardless of whether the user has scrolled down the page? If so, you can pin your navbar:
position: fixed; top: 0; left: 0; right: 0;
. Remember to put thez-index
with value above the content of your application (I usually put 999).– LipESprY
I want to keep the navbar fixed when it rolls sideways and not down
– Lucas Fieri
Friend the main thing that I html vc did not put in the question. Edit and put the html and the full CSS if possible. You are using some Bootstrap framework or other?
– hugocsl