Creating a textarea-like <div>?

Hi,

What kind of CSS attributes should I give a <div> so it would act and look exactly like a <textarea> (with the exception of the text being editable)?

Thanks,
Chen

CSS:


div.tarea {
  border: 1px inset #ccc;
  background-color: white;
  font: small courier, monospace black;
}

HTML:


<div class="tarea">
This looks like a textarea.
</div>

Or if this is part of a form, just use a textarea:


<textarea readonly="readonly">
My text that you can't edit
because this is readonly
</textarea>

vinnie…you forgot


div.tarea {
    border: 1px inset #ccc;
    background-color: white;
    font: small courier, monospace black;
    width: 500px;
    height: 300px; /* or whatever measurements you want */
    overflow: auto; /* in most browsers, this will results in a scrollbar when there's more content than can fit in the dimensions defined above */
}

:slight_smile: