<textarea style=" text-align:center" ></textarea>
1
2
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:
http://www.w3.org/TR/CSS21/conform.html#conformance:
CSS 2.1 does not define which properties apply to form controls and frames, or how CSS can be used to style them. User agents may apply CSS properties to these elements. […]
The same could also apply to the TEXTAREA case.