user2815059 user2815059 - 1 year ago 106
HTML Question

How to remove extra space inside textarea

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:

<th > History:</th>
<textarea style="margin-left:90px"; name="history"cols="80"label="notes"rows="4"wrap="virtual">
<?php echo $my_class->history;?></textarea>

You can see the problem here:enter image description here

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download