Reza Reza - 4 months ago 8
HTML Question

Making text appear in the middle of a button

When I use

<button id="kh_send_comment">
<i class="material-icons">done</i>
Save
</button>


the position of the word
Save
is on the bottom of the button. I would like it to be in the middle of it. How can I do this without changing the font size?

https://jsfiddle.net/ba3vg9k8/

Answer

Use this CSS:

button i { vertical-align: middle }

https://jsfiddle.net/bgr3a1oL/1/