开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜