Jump to content

blank spaces in my textarea


ianhaney
Go to solution Solved by Barand,

Recommended Posts

Hi

Each time I go to insert or edit a textarea, I seem to have big blank space before typing so can't start typing from the left and always seems to start way over to the left on the first line and I keep having to delete the blank spaces so is over to the left before I can start typing, the coding I have is below

<strong>Comments:</strong> 
                        <br> 
                        <textarea name="comments"> 
                        <?php echo $comments; ?> 
                        </textarea>

Just seeing if anyone can see if I have done anything wrong somewhere?

 

Thank you in advance

 

Ian

Link to comment
Share on other sites

With the textareas whatever is between the opening and closing tags is treated as the value. This is why you are having lots of whitespace before (and after) the php value that is being outputted. I would suggest to remove the whitespace/code indentation inside the textarea tags, with addition of applying trim to $comments.

<strong>Comments:</strong> 
                        <br> 
                        <textarea name="comments"><?php echo trim($comments); ?></textarea>
Edited by Ch0cu3r
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.