OK I think this is a much easier solution. I hope you don't mind that I didn't use the same html layout that you did...but it does the same thing.Besides you should only really use unordered lists <ul></ul>
for exactly that, and use <div></div> <span></span>, etc
for ordering your layouts. Anyway, here's a simpler version of what you want to do: jsfiddle
Updated:
Sorry I'm at work so I was quickly trying to give an answer without taking up too much time to explain it...which likely isn't helpful. Anyway, here's the information on what I did.
Basically you take the outer div and assign it a class of menu. Give the parent div, or the menu in our case, a height and width. Then place each link in it's own div. These will be the children divisions.
The css for the children give them a percentage of the of the parent's width and 100% it's height. Make sure to make the display inline-block so they will be in a line and not stack on top of each other. OK so far I think everything is pretty easy to grasp from the css code, but here's the tricky part:
IN order to get the links to be vertically aligned you'll move them down by 50% of their parent's height...hence top: 50%. Then you need to adjust for their own height. You can do this by using transform: translateY(-50%); which moves the element up by 50% of it's own height. This is a very brief and you can read more from the article I initially read on the subject here: Vertically Center Elements
And here's the code:
html:
<div id="menu">
<div class="child">
<a href="/joomla31/">Somos</a>
</div>
<div class="child">
<a href="/joomla31/index.php/segunda-pagina">Segunda Página</a>
</div>
<div class="child">
<a href="#">Este es un texto largo para el menú</a>
</div>
</div>
css:
#menu{
width: 100%;
height: 100px;
display: block;
}
.child{
margin: 1%;
background-color:#3d2f2f;
width: 30%;
height: 100%;
text-align: center;
display: inline-block;
}
a{
background: #ffdb4c;
position: relative;
top: 50%;
transform: translateY(-50%);
}