How do I vertically center align text in inline-block?

Hey Webflow Community,

I am struggling to center align the text vertically for my category tags.

How do I achieve that?

Thank you for your help!

should be like this

Best wishes and a wonderful day,

Here is my site Read-Only: Webflow - Julian Being
(how to share your site Read-Only link)

Try using inline-block instead of just inline—this will unlock top/bottom padding (as well as margin)—and it will even out the spacing around the nested text element:

Thank you, Mike! That worked!

Amazing. I am very grateful!

Have an amazing day! :slight_smile:


1 Like

hi @fredj32 If you will ever come to situation when you will have to use inline element you can set height of your element and after give identical value to line-height

In your case eg. c-category-tag set height: 32px and c-category-tag__text for font line-height: 32px

Just another simle trick :wink: