Return to Snippet

Revision: 22692
at January 19, 2010 11:42 by jpsirois


Initial Code
<form>
    <div>
        <label><input type="checkbox" /> Label text</label>
    </div>
</form>

<style type="text/css">
label {
    display: block;
    padding-left: 15px;
    text-indent: -15px;
}
input {
    width: 13px;
    height: 13px;
    padding: 0;
    margin:0;
    vertical-align: bottom;
    position: relative;
    top: -1px;
    *overflow: hidden;
}
</style>

Initial URL
http://stackoverflow.com/questions/306252/how-to-align-checkboxes-and-their-labels-consistently-cross-browsers

Initial Description


Initial Title
Align Label with Checkbox Cross-Browser in CSS

Initial Tags
css, html

Initial Language
CSS