Technology

CSS Know-How: Center Aligning Checkboxes

Discover the simple trick for vertical centering of checkboxes in CSS, ensuring cross-browser compatibility.

Sangrak
To achieve a degree of vertical alignment for a checkbox (input type=checkbox), applying `vertical-align:-2px;` can be quite effective (based on 9pt Gulim font). This adjustment is particularly useful due to the varying behaviors of checkboxes across different browsers—a notably frustrating issue encountered on the Wings Bus terms and conditions confirmation page.

Note: This fix has not yet been tested on Internet Explorer.

More on this topic