Skip to content Skip to sidebar Skip to footer

Css - Verticaly Align Horizontal Li

I'm trying to vertically centralize an a: element within an li in a wordpress navigational menu, however I wasn't successful in achieving this. The code I'm using is: CSS .site-men

Solution 1:

So going by your CSS I'm guessing that .site-menu .menu ul li a is the element that you wish to center? Anyway, in general you can center the children of any element this way:

display: flex;
align-items: center; /* To center vertically */

More information can be found here.

Post a Comment for "Css - Verticaly Align Horizontal Li"