Page 1 of 1

Is it possible to focus the center of text box?

Posted: Sat May 17, 2008 2:44 am
by vinoth
Hi.

I am working with PHP & Javascript functions.

While clicking the text box, It will clear the contents of the text box by(onFocus="doClear(this)) and the cursor blink at the left side of the box..

Is it any possible way to make blink the Cursor on center of the box or 2nd position of the Box?

Please suggest, guide me to Do this

Thanks in advance

Re: Is it possible to focus the center of text box?

Posted: Sat May 17, 2008 12:25 pm
by Eran
Add 'text-align:center;' to the style declaration of the input in question.

Re: Is it possible to focus the center of text box?

Posted: Mon May 19, 2008 2:31 am
by vinoth
hi pytrin,

Thanks for your suggestion,

Its working fine