Developer Ramblings
Tips and Traps in Web Development

Scrolling Text Areas in a Web Page

December 18, 2007 16:08 by viperguynaz

Today, my designer handed me a fixed height design for a web page and was adamant that a text area have a vertical scroll bar.  I hate scroll embedded scroll bars but I sought out a solution and found a rather elegant one.

.containerContentScroll
{
 overflow: auto;
 height: 500px;
 scrollbar-base-color: #963;
}

 

It is really that easy - set a height for your container (textarea, div, etc...) and set the overflow to auto.  You can also color the scrollbars (not in FireFox).

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories:
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

May 17. 2008 11:23