I would like to know how to centralize the menu below:
.dropdownmenu ul, .dropdownmenu li {
margin: 0;
padding: 0;
}
.dropdownmenu ul {
background: gray;
list-style: none;
width: 100%;
}
.dropdownmenu li {
float: right;
position: relative;
width: 200px;
}
.dropdownmenu a {
background: #30A6E6;
color: #ffffff;
display: block;
font: bold 12px/20px sans-serif;
padding: 10px 25px;
text-align: center;
text-decoration: none;
-webkit-transition: all .25s ease;
-moz-transition: all .25s ease;
-ms-transition: all .25s ease;
-o-transition: all .25s ease;
transition: all .25s ease;
}
.dropdownmenu li:hover a {
background: #000000;
}
#submenu {
left: 0;
opacity: 0;
position: absolute;
top: 35px;
visibility: hidden;
z-index: 1;
}
li:hover ul#submenu {
opacity: 1;
top: 40px; /* adjust this as per top nav padding top & bottom comes */
visibility: visible;
}
#submenu li {
float: none;
width: 100%;
}
#submenu a:hover {
background: #000000;
}
#submenu a {
background-color:#30A6E6;
}
<body>
<nav class="dropdownmenu">
<ul>
<li><a href="index.html">Inicio</a></li>
<li><a href="sobre.html">Sobre</a>
<ul id="submenu">
<li><a href="#">História</a></li>
<li><a href="sejasocio.html">Seja Sócio</a></li>
<li><a href="nucleos.html">Núcleos</a></li>
<li><a href="aliados.html">Aliados</a></li>
<li><a href="gestao.html">Diretoria</a></li>
</ul>
</li>
<li><a href="noticias.html">Notícias</a></li>
<li><a href="#">Interativo</a>
<ul id="submenu">
<li><a href="musicas.html">Músicas</a></li>
<li><a href="fotos.html">Fotos</a></li>
<li><a href="videos.html">Vídeos</a></li>
</ul>
</li>
<li><a href="loja.html">Loja</a></li>
<li><a href="contato.html">Contato</a></li>
</ul>
</nav>
</body>