I am trying to make a form with a horizontal layout:
<form id="foo" name="foo" method="post" action="fooaction"> <p>Enter a foo: <input type="text" id="fooText" name="fooText"value=""/> <input type="image" name="yes" id="fooSubmitYes" value="1" src="yes.png" title="Yes" width="24" height="24"/> <input type="image" name="no" id="fooSubmitNo" value="0" src="no.png" title="No" width="24" height="24"/> </p> </form>
The problem is that the first input, the text field, works well with the text "Enter foo:", but the other two inputs are very poorly aligned with the text field; they are about 7 pixels too high. The margins and indents for all of these elements are set to 0.
If I add align = "middle" to the image inputs, they move 12 pixels down, so they are 5 pixels too low, which scares my mind. More vaguely, the CSS vertical-align property does not affect input elements (they ignore it), so it's hard for me to imagine how to fix this in CSS.
Does anyone know of a browser-portable way to create a form with an inscription, an input text box, and two submissions of images with a horizontal layout and sequential vertical alignment? If not, I would agree to something that works in Firefox :) (95% of my users).
source share