re: 5 Useful Little CSS Tricks VIEW POST

VIEW FULL DISCUSSION
 

You can also use flexbox on the parent element:

.nav {
  align-items: center;
  display: flex;
  height: x;
}

By altering line-height, you're only getting vertical alignment as a side-effect, so it may be better to apply it to the parent instead.

code of conduct - report abuse