I have a textarea which displays some data from "history" column in my database. For unknown reason there is nearly 1.5 line of extra space before the text. Anyone can give me some idea why does it happen? Here is my HTML piece:
<div> <table> <tr> <th > History:</th> <td> <textarea style="margin-left:90px"; name="history"cols="80"label="notes"rows="4"wrap="virtual"> <?php echo $my_class->history;?></textarea> </td> </tr> </table> </div>
You can see the problem here:
Just put your php open tag right after the textarea close tag.. Dont use line break.. And close php exactly before (as you have done).. This will erase all the whitespaces..
The HTML textarea wrap Attribute is used to specify that in which manner the text is to be wrapped in a text area when a form is submitted. Attribute Values: soft: It specifies that the Text present in the Textarea would not be wrapped after submitting the form. This is the default value.
By default, a textarea is editable. So you must have made something that make it uneditable.
You need to define width of the div containing the textarea and when you declare textarea , you can then set . main > textarea to have width: inherit . Note: .
Its because your php tag is on a newline. It is reading in the whitespace from where <textarea>
ends until php tag opens. Put this all on one line to fix.
Just put your php open tag right after the textarea close tag.. Dont use line break.. And close php exactly before (as you have done).. This will erase all the whitespaces..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With