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.