Right justifying numbers in an input field
Using this example, how would I right justify numbers in the input fields?
<html>
<开发者_高级运维body>
<form name="input" action="html_form_action.asp" method="get">
Taxes: <input type="number" name="Taxes" value="" /><br />
Shipping: <input type="number" name="shipping" value="" align="right" /><br />
<input type="submit" value="Submit" />
</form>
<p>Click the "Submit" button, the form-data will be sent to a page called "html_form_action.asp".</p>
</body>
</html>
Style your input with:
text-align: right;
This will right justify all text in your input.
精彩评论