Reputation: 11159
I have a form where the last line of input fields is followed by 2 image buttons.
No matter what I try I can't seem to horizontally align the buttons with the field.
Here's all the code: http://jsfiddle.net/h3ZPk/
Upvotes: 5
Views: 12472
Reputation: 11931
I don't often recommend this, but please use a table. They are old-fashioned, but they work VERY WELL for forms.
<table>
<tr>
<td>Label1</td><td><input type="text" /></td><td></td><td></td>
</tr>
<tr>
<td>Label2</td><td><input type="text" /></td><td></td><td></td>
</tr>
<tr>
<td>Label3</td><td><input type="text" /></td><td><input type="button" /></td><td><input type="button" /></td>
</tr>
</table>
EDIT:
Upvotes: 3
Reputation: 207901
Add this rule:
#buttons img, #buttons input {
vertical-align:bottom;
}
Upvotes: 13