I have a header with 2 divs, the first one (floating to the left) is a simple horizontal unordered horizontal list, which is properly centered vertically (header has line-height the same as it's height and vertical-align: middle). The second div is floating to the right, and it also has a horizontal unordered list, however it has round (border-radius: 50%) hyperlinks and no text in them at all (they are going to be used as icons, with background-image). While the first div is aligned properly no matter what is the size of header, the second one stays at the top.
My code:
#header
{
background-color: #a3a3a3;
color: black;
height: 50px;
line-height: 50px;
vertical-align: middle;
}
#header #icons
{
float: right;
}
#header #icons ul
{
margin: 0;
padding: 0;
}
#header #icons ul li
{
list-style-type: none;
display: inline-block;
float: right;
}
#header #icons ul li a
{
display: inline-block;
text-decoration: none;
width: 35px;
height: 35px;
border-radius: 50%;
background-color: #787878;
}
You can check the code & results here: https://jsfiddle.net/mf6yg78f/ How can I vertically align the round list elements? I'd prefer to stay away from any flexboxes etc.