<html>
<body>
This should be level with the middle of the box!
<textarea id="id" name="name" rows="9" cols="50">Text is in here!</textarea>
</body>
</html>
Picture of what this ends up looking like.
How do I make it so that the text to the left of the box stays level with the middle of the box, even if it’s being dragged around? Can it be done with CSS, or will it require Javascript?
You need to set both the text and textarea to
vertical-align: middle. Example HTML:If you want to set a width/height on the text, add
display: inline-blockto the.middletextclass.