HTML textarea curson indented for some reason
I need the cursor justified to the left. For some reason its indented when rendering on the page:
<td>
You have <strong><span id="comments开发者_Python百科Counter">${const['COMMENT_MAX_LENGTH'] - fn:length(commentForm.comment)}</span></strong> characters left.<br/>
<textarea id="comment" name="comment" rows="2" cols="125" style="width:395px;"
onkeypress="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)"
onkeydown="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)"
onkeyup="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)">
</textarea>
<a href="javascript:addComment();"><img src="../images/icon_add.gif" border="0" alt="Add"/></a>
</td>
</tr>
thanx for the help
Try this:
<textarea id="comment" name="comment" rows="2" cols="125" style="width:395px;" onkeypress="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)" onkeydown="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)" onkeyup="characterCounter('commentsCounter',${const['COMMENT_MAX_LENGTH']}, this)"></textarea>
Your closing </textarea>
tag should always be on the same line to avoid issues like this.
精彩评论