I have been trying to find a solution to a common problem but due to some CSS rules in my code I can't use any of the solutions that I have found. I have an horizontal menu (a <ul> <li> <a>
) with different items, with different widths and I am not able to distribute the items inside the menu so they have the same space between each other. This is the code:
<nav id="main-menu">
<ul class="child-menu">
<li class="menu-1"><a>outsourcing tecnologico</a></li>
<li class="menu-2"><a>seleccion de personal</a></li>
<li class="menu-3"><a>solucion integral de nuevos profesionales</a></li>
<li class="menu-4"><a>consultoria</a></li>
<li class="menu-5"><a>formacion especializada</a></li>
<li class="menu-6"><a>I+D+I<a></li>
</ul>
</nav>
The CSS :
#main-menu {
background-color:#000;
position:relative;
margin:10px 0 0 0;
width:980px;
height:28px;
float:left;
}
#main-menu ul {
width:980px;
margin:0;
}
#main-menu ul li {
float: left;
font-size: 12px;
text-transform: uppercase;
font-weight: bold;
}
#main-menu ul li a {
display:block;
color:#fff;
text-decoration:none;
line-height:27px;
height:28px;
text-align:center;
}