Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing text-align in a text box

Status
Not open for further replies.

Behrooz

Programmer
May 10, 2001
6
CA
I have this:

<INPUT type=text language=javascript maxLength=50 name=Sender size=30 value=&quot;&quot; style=&quot;FONT-FAMILY: sans-serif; FONT-SIZE: 16px; TEXT-ALIGN: right;&quot;>

Can I change the TEXT-ALIGN from &quot;right&quot; to &quot;left&quot; in a Javascript function?




 
you can use:

elementobject.style.textAlign = 'left';

remember, if a css property is seperated by a '-', you can usually just change it to camelCase as above and remove the
dash to access it jared@eae.net -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top