PDA

View Full Version : To Display a Scrollbar in the TextArea



jiapei_jen
May 3rd, 2007, 04:00 PM
I am using IE6. I wonder how to force to display a scrollbar in the textarea.

My code only displays a vertical scrollbar after the # of specified rows is exceeded. But, I want to displays a vertical scrollbar when the textarea is still a blank:


<TEXTAREA id="statuteTextArea" name="statuteTextArea" style="height:12em;" rows="10" wrap="on" cols="55" class="textAreaDefault"></TEXTAREA>

and
[code]
.textAreaDefault
{
BORDER-TOP: #006699 1.5px solid;
BORDER-LEFT: #006699 1.5px solid;
BORDER-RIGHT: white 1.5px solid;
BORDER-BOTTOM: white 1.5px solid;
FONT-FAMILY: Verdana, sans-serif;
font-size:1em;
overflow:auto;
scrollbar-face-color: #C0C0C0;
scrollbar-arrow-color: #587090;
scrollbar-track-color: #90A0B0;
scrollbar-shadow-color: #7B7B7B;
scrollbar-highlight-color: #F9F9F9;
scrollbar-3dlight-color: #FFFFFF;
scrollbar-darkshadow-Color: #8B8B8B;
}
[/code>

jiapei_jen
May 3rd, 2007, 04:49 PM
I want to show the vertical scrollbar only. I can specify:

overflow:scroll;

However, I do not want to display the horizontal scrollbar. What should I do?

jiapei_jen
May 3rd, 2007, 06:56 PM
Let me answer my own question.

The answer is:

overflow-y:scroll;