Guys, I have a problem with the use of vertical align. My <li>
of the start menu is 80px in height and set to align in half. It just does not work, huh.
Guys, I have a problem with the use of vertical align. My <li>
of the start menu is 80px in height and set to align in half. It just does not work, huh.
Change the display from .headercontainer li
to table-cell .
.headercontainer li{
display:table-cell;
height:inherit;
vertical-align:middle;
}
Example : link
Suggestion:
.headercontainer li {
top: 50%;
transform: translateY(-50%);
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
The transform: translateY(-50%);
is to correct the position, otherwise it would be 50% + height of the element.
Add line-height: 80px in element li. I leave here the fiddle: link