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

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

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

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

We have to add vertical-align property, to align checkboxes and their labels consistently cross-browsers with CSS.

For instance, we can write

input {
  vertical-align: -2px;
}

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

Conclusion

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

Leave a Reply