In my design, there is a Navbar hamburger container and also a text container.
Let's start with the nav container:
.containerham{
width: 100%;
height: max-content;
-webkit-transform: translateY(-100%);
transform: translateY(-100%);
position: relative !important;
z-index: 100 !important;
border-bottom: 1px solid grey;
}
And now, moving on to the text container:
.headdingtextcon{
width: 17rem;
justify-self: center;
align-self: center;
height: min-content;
padding: 0.5rem;
position: relative !important;
top: -5rem;
left: -1.5rem;
font-size: 2rem;
z-index: 1 !important;
}
The issue I'm facing is that my nav container is not overlapping my text container as desired, it appears the other way around: enter image description here
Just for some background information, my navbar includes an animation that might provide insight:
.slideInDown {
-webkit-animation-name: slideInDown;
animation-name: slideInDown;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes slideInDown {
0% {
-webkit-transform: translateY(-100%);
transform: translateY(-100%);
visibility: visible;
}
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
@keyframes slideInDown {
0% {
-webkit-transform: translateY(-100%);
transform: translateY(-100%);
visibility: visible;
}
100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
}
.slideOutUp {
-webkit-animation-name: slideOutUp;
animation-name: slideOutUp;
-webkit-animation-duration: 2s;
animation-duration: 2s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes slideOutUp {
0% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
100% {
visibility: hidden;
-webkit-transform: translateY(-100%);
transform: translateY(-100%);
}
}
@keyframes slideOutUp {
0% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
100% {
visibility: hidden;
-webkit-transform: translateY(-100%);
transform: translateY(-100%);
}
}
Lastly, the text container is the one featuring the lovely word beside it.