Nov 21, 2006 - 09:06 AM
There are two kinds of textboxes in HTML, and
For the first one ( ) I don't think it is possible to change the alignment (not even CSS's direction: rtl seems to have any effect...)
but for the it is quite simple with center"
You can change the height of a to make it look like an field :-)
Nov 21, 2006 - 10:32 AM
I actually found the answer myself also. I was able to center the textbox like this:
It worked like a charm. Thanks for your input.
Feb 11, 2007 - 09:41 AM
John is right, "text-align: center" is all that is needed. Sorry for my mistake.
Feb 11, 2007 - 09:43 AM
This css property will center text within textboxes and textareas.
Jan 05, 2015 - 01:01 AM
Dec 17, 2015 - 01:47 AM