Hello! I can not centralize an ul inside the div CSS
.menu{clear:both;position:relative;width:100%;}.sessoes{width:1000px;margin:0auto;}.menuNav{width:100%;text-align:center;background-color:#3E4095;}ul.menuTopo{text-align:center;}ul.menuTopoli{height:50px;border-left:#005E9C1pxsolid;}ul.menuTopolia{display:inline-block;height:50px;line-height:50px;vertical-align:middle;text-align:center;color:#FFF;background-color:#3E4095;}ul.menuTopolia:hover{color:#FFF;background-color:#CCC;}
HTML
<divclass="menu">
<div class="sessoes">
<nav class="menuNav">
<a class="menuFechar"><img src="../_img/btn-close.png" width="30px;" title="Abrir Menu" /></a>
<ul class="menuTopo">
<li><a href="principal.php" title="Principal">Principal</a>
<li><a href="principal.php?acao=cadastrar" title="Cadastrar">Cadastrar</a>
<li><a href="principal.php?acao=editar" title="Editar">Editar</a>
<li><a href="principal.php?acao=pedidos" title="Pedidos">Pedidos</a>
<li><a href="emails.php?acao=listar" title="E-mails">E-mails</a>
</ul>
</nav>
</div>
</div>
If I do
ul.menuTopo {
width: 100%;
text-align:center;
}
Instead of being 100% of the parent div that is the div menuNav, it pushes the divs that are below it all to the left.
Another problem is the accounts:
There are 1000px of menuNav (100% of divesessoes). So I have a right border of 1 px for each li and a boda left from 1px for the first li. So, it's 1000 - (5 + 1) = 994. 994/5 = 198.8px. Can put up to 195 that gives line break. How do I arrange this?