Nathan Nathan - 7 months ago 26
HTML Question

Modifying TextArea with Scrolling, and positioning placeholder.

So, essentially I'm working trying to create an input bar, which will allow the user to input a list of account numbers, which can then be sent to query a web service. So the input bar is long, and extends nearly to the bottom of the page ( as the user can input up to 100 account numbers at a time), and is within nav tags to keep it securely on the lefthand side of the view.

At the moment, the placeholder runs across the middle,rather than the top where I want it, doesn't scroll (vertically), and I need to be able to press Enter and create a new line within the input bar - not submit. I know, that's a lot.

Currently, my code looks like so:

<div id = “input”>
<form>
<input type = “text” id = “Actinput” class = “form-control” placeholder = “Paste/Import Here” required style = “ display : table; height : 45h; resize: none; border-radius: 0px; overflow-y: scroll”>
</form>
</div>


Any help would really be appreciated everyone. Thanks.

Answer

You could use <textarea> instead of <input type="text">.