this is the website I'm developing now I have a problem with how to auto navbar expand on mouse hover on this site http://www.kasuncfernando.tk/dls/index.html can you guys inspect it and tell me what to do or what to add, thank you
how to set navbar auto-expand on mouse hover
CodePudding user response:
Here is one item of the menu. Try this:
.dropdown-menu.multi-level {
display: none;
}
.nav.navbar-nav li:hover ul {
display: block
}
<ul class="nav navbar-nav">
<li>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Admission <b class="caret"></b></a>
<ul class="dropdown-menu multi-level">
<li><a href="btech_admission.html">B.Tech</a></li>
<li><a href="mtech_admission.html">M.Tech</a></li>
<li><a href="phd_admission.html">Ph.D</a></li>
</ul>
</li>
</ul>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>
CodePudding user response:
This will work, check if it helps:
.navbar-nav > li:hover > .dropdown-menu {
display: block;
}