aray12 aray12 - 2 years ago 160
HTML Question

How do I create a scrollable textbox?

Currently, the site has the following css class that is intended to be used for note (longer texts) entries in a form.

.scrollabletextbox {
font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
font-size: 82%;

The size of the box and other styling register correctly, but the text start vertically centered and never line breaks. The only way to view the text completely is to move the cursor left/right.

The form uses the following html (with a little php) to implement the large text box

<input type="text" class="scrollabletextbox" name="note" value="<?php echo $note; ?>">

Thank you in advance for any help.

Answer Source

Try replacing input type="text" with textarea tag.

Change your code to:

<td width="100">
<textarea class="scrollabletextbox" name="note">
  <?php echo $note; ?>
<br /> 

It sends data just as a normal input tag, so you can get data from it same methods.

More info about textarea tag here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download