• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Centering Text in TEXTAREA

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to make the text that is typed in a TEXTAREA (with width and height specified) appear in the middle of it.

The text that I typed is left-aligned. Because I have wrap="on", every single line is left-aligned with no space in between the text and the left wall of the TEXTAREA. Please advise. Thank you.
 
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If by middle you mean centered you could try using a CSS and set the TEXTAREA tag to have the text-align to center OR maybe take a look at margin-left? Hope this helps. Could you post what you find works for you so as to benefit the rest of us? Thanks.

Rob
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
margin:left does not work. And text-align:center puts every single line in the center of the TEXTAREA. I still want left alignment of all text.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you don't eant the text centered, perhaps your subject line is poorly chosen?

Also, take the time to learn the difference between margin and padding.
 
reply
    Bookmark Topic Watch Topic
  • New Topic