I have all day trying to center the pull-down menu and nothing that I have achieved. It should be noted that part of the menu is made with Bootstrap since I think of making the page with this framework, the pull-down menu I was trying to do with the help of CSS but nothing that achieved it, the fold-down menu always crawls below the list and I do not achieve make it occupy 100% of the screen and that is centered and with the link's side by side. When I apply the inline.block property instead of being placed side by side what they do is place one on top of the other, I do not understand why.
here is my code:
*{
padding: 0;
margin: 0;
}
#menu-desplegable{
display: none;
}
li:hover #menu-desplegable{
display: block;
width: 100%;
}
#logo{
width: 100px;
height: 30px;
}
ul li #menu-deplegable{
list-style: none;
}
nav.navbar{
position: relative;
width: 100%;
margin: 0 auto;
}
ul.navbar-nav li #menu-desplegable{
position: absolute;
left: 0;
width: 100%;
background-color: aqua;
z-index: 3;
text-align: center;
}
ul.navbar-nav {
display: block;
text-align: center;
position: relative;
width: 100%;
}
ul.navbar-nav li {
display: inline-block;
margin: 0;
padding: 0;
font-size: 18px;
line-height: 50px;
z-index: 3;
}
#menu-desplegable {
margin-left: 0;
text-align: center;
position: absolute;
left: 0;
}
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#" style="position: absolute;">Navbar</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" id="link-desplegable" href="#">Menu Desplegable</a>
<ul id="menu-desplegable" style="color: indigo;" >
<li><a href="">Enlace 1</a></li>
<li><a href="">Enlace 2</a></li>
<li><a href="">Enlace 3</a></li>
<li><a href="">Enlace 4</a></li>
</ul>
</li>
</ul>
</div>
</nav>
Could someone help me please? what I want to do is a menu like the one on this page: drop-down menu , I do not see the complication, but I think what is making things difficult for me is Bootstrap.