cola
cola

Reputation: 12466

How can I get the font cursor at top, text-align: top?

If i set the css for textarea like this=>

#id_content {
    padding: 0;
    width: 100%;
    height: 600px;
}

The height and width work. But if i type something on textarea texts are at the middle of the height of the textarea though the padding:0.

Why is it happenning? How can i fix it?

This is the html source=>

<div id="id_div_content">

<form action="/createpost/" method="post"><div style='display:none'><input type='hidden' name='xxx' value='xxx' /></div>
<p><label for="id_title">Title:</label> <input id="id_title" type="text" name="title" maxlength="100" /></p>

    <p><label for="id_content">Content:</label> <input type="text" name="content" id="id_content" /></p>
<input type="submit" value="Submit" />

Upvotes: 2

Views: 1331

Answers (1)

Lem Ko
Lem Ko

Reputation: 423

That happens if you are using the input tag in your html as such:

<input type="textarea" id="id_content" />

If you are, use the textarea tag instead:

<textarea id="id_content"> </textarea>

Upvotes: 4

Related Questions