How can I align the input and select form elements in my test case, so
that their horizontal borders are aligned and all text including
labels is aligned to the baseline?

See my test case:
http://jsfiddle.net/cizmazia/KMVmw/

Or see the sample code below.

Thank you.
Michal Čizmazia


<form action="Submit" method="post">
<p>
    <label>Sex<select><option value=""
selected="selected">Sex</option></select></label>
    <label>Date of Birth<input type="text" value="Date of Birth" /></label>
</p>
</form>


body, input, select {
    font-family:Helvetica,Arial,sans-serif;
    font-size: 12px;
}

select, input {
    height: 20px;
    padding: 0;
    margin: 0;
    border: 1px solid gray;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

label {
    padding: 0;
    margin: 0;
}
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to