php - how to align text in textarea in html -


i have textarea , writing php code prefill textarea upon refresh. "prefill" part working fine.

my problem when start type in textarea, text not left aligned. starting @ random point in textarea box. want left aligned normal text box.

here code:

<textarea rows = 10 cols = 95 name = answer5> <?php echo stripslashes(htmlentities($_post['answer5'])); ?> </textarea> 

try 2 things:

  • put on 1 line
  • trim echoed value

so this

<textarea rows = 10 cols = 95 name = answer5><?php echo trim(stripslashes(htmlentities($_post['answer5']))); ?></textarea> 

this because textarea has special rules defy (as call it) normal markup rules. never understood it. data inside textarea used is, including leading , multiple spaces, etc. html comments inside textareas outputted.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -