How to Align text in the TextBox Server Control

First, in your StyleSheet (either inline or external), create a class. For the sake of this tip, we’ll call it ‘txtAlign’, but the name doesn’t matter.

Then, add your alignment needs to the class:
text-align: right;

Lastly, inside the TextBox Server Control on your page, use the CSSClass property of the textbox to assign the CSS value to the textbox:
CSSClass=”txtAlign”

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>