I’m using bootstrap classes and I don’t know why is the The drop down menu is overlaping with the text
enter image description here
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul id="nav-list" class="nav navbar-nav navbar-right d-block d-sm-none row">
<li class="li-Menu text-center">Chiken</li ><hr">
<li class="li-Menu text-center">Beef</li><hr">
<li class="li-Menu text-center">Sushi</li>
</ul>
</div>```
There was a me-auto class , I removed it and I searched more and there seem to be no answer
2
Answers
Yes
And that is very easy to fix
Add the following css code to your css
Or if you prefer using the classname
This will make the drop-down be more important and display on top when opening it
Edit: try the following:
Fixing this is simple. Your navabar dropdown is below the elements. If you add
.collapse { z-index: 1000; }
it will be displayed above the other elements.You should also do
.collapse { background-color: white }
to make sure you don’t see anything below it.If you want it to move elements under it so that you can see them, add this:
.collapse { display: block }
If those elements are absolutely positioned, then I don’t really know how to move them.Edit: @Marcus Petersen asked me to add the code for it to work, so here it is.
CODE: