Nathan Riley
asked on
Alignment of Labels and input fields
What's the best way to align text and a input field. With the below code everything works correctly, but the alignment of the text and the actual input fields are all over the place.
You can see the example here:
http://jsfiddle.net/gallitin/nsPdB/
How can I make them all align evenly the best way?
You can see the example here:
http://jsfiddle.net/gallitin/nsPdB/
How can I make them all align evenly the best way?
<form method="get" action="#">
Interest Rate <input type="text" name="interestrate" value="'.$interestrate.'" style="width:50px;"/>%<br>
Term <input type="text" name="term" value="'.$term.'" style="width:50px;"/>Months<br>
Down Payment <input type="text" name="downpayment" value="'.$downpayment.'" style="width:50px;"/><br>
Monthly Payment
<input type="image" src="assets/img/recalculate.png" style="margin-top:5px;"/>
<a href="#"><img src="assets/img/continue.png" style="margin-top:5px;"/></a>
</form>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I never bother with a for for input labels, not intuitive (at least for me) like it is for radio/checkboxes.
@Gary - Accessibility! Screen readers etc. benefit from having labels explicitly tied to their inputs..