Ahmad Shadeed 7/30/2021

Aligning a Button Label Vertically

Read Original

This article explains a common CSS problem where font line-height causes unwanted spacing in button labels, making vertical alignment difficult. It details a practical fix using a pseudo-element with `vertical-align: middle` to center button text, offering a better alternative to manual padding adjustments.

Aligning a Button Label Vertically

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
The Beautiful Web
Jens Oliver Meiert 2 votes
3
LLM Use in the Python Source Code
Miguel Grinberg 1 votes
4
Wagon’s algorithm in Python
John D. Cook 1 votes