Mawg Mawg - 25 days ago 13
CSS Question

How can I align numeric input right and text input left?

If I have two

<input type="text" ...
and I know that one should aceept text and the other a numeric value (and will check that in PHP when validating the form), can I align the contents of the text box left & the contents of the numeric box right using CSS?

Rob Rob
Answer
<style type="text/css">
     .right { text-align: right; } </style>

<input type="text" /> <input type="text" class="right"/>
Comments