3 ms·
Flexbox makes vertical alignment a snap. It's even pretty well supported these days: https://caniuse.com/#search=flexbox https://caniuse.com/#search=flexbox In
by dceddia 8y ago
Flexbox makes vertical alignment a snap. It's even pretty well supported these days: https://caniuse.com/#search=flexbox https://caniuse.com/#search=flexbox
In this case, all you need to do is add "display: flex; align-items: center" to your a tags. After that I'd probably get rid of the margin-bottom on them too. Finally, to visually center everything vertically, remove the margin-top on the img inside the a.
A bonus of using display:flex is that it'll fix the wrapping problem where long links wrap underneath the image. With flex, the text will stay on the right, in its own "column".
- armatav 8y agoYou are a genius. I was super panicked and couldn't get the working memory going to actually fix the spacing. Thanks!