Textarea 's content absolute align center

<textarea style=" text-align:center" ></textarea>


why? if i input “1” in textarea ,then press enter key and then input “2” .
“1” is not absolute align ceter ? how to resolve this problem ?

think you for your attention .

from china

Hi, yottalab, welcome to the forums.

AFAIK styling form inputs with CSS is notorious for inconsistent browser support. This may be one of those where the browser “does it’s own thing”.

I think it would be involved, but if you must, maybe use javascript to pad the input with spaces?

The ‘typed text’ within a TEXTAREA ‘text box’ (what a mouthful) is an “input control” really. So it’s quite correct it doesn’t have to centre align the text though it is likely to right align due to language ‘text direction’. For further clarification:

The same could also apply to the TEXTAREA case.