Categories
CSS

How to align checkboxes and their labels consistently cross-browsers with CSS?

Spread the love

Sometimes, we want to align checkboxes and their labels consistently cross-browsers with CSS.

In this article, we’ll look at how to align checkboxes and their labels consistently cross-browsers with CSS.

How to align checkboxes and their labels consistently cross-browsers with CSS?

To align checkboxes and their labels consistently cross-browsers with CSS, we add vertical-align property.

For instance, we write

input {
  vertical-align: -2px;
}

to adjust the vertical position of the input with vertical-align: -2px;.

Conclusion

To align checkboxes and their labels consistently cross-browsers with CSS, we add vertical-align property.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *