Wednesday, 6 February 2013

Aligining form label / inputs with CSS

The following (simple) CSS will help align label/input pairs in a form:

#dialog label {
    clear: left;
    float: left;
    width: 10em;
    padding-left: 3em;
}

#dialog input {
    float: left;
    margin-bottom: 1em;
}

No comments:

Post a comment