PDA

Click to See Complete Forum and Search --> : Makeing a <DIV> scrollable??


Smirre
Mar 14th, 2002, 09:05 AM
How can I make a div scrollable???

I want it to have scrollbars if the content doesnt fit in the specified size of the div...

/Smirre

JoshT
Mar 14th, 2002, 10:44 AM
The CSS overflow attribute does it.
<div style="width: 150px; height: 100px; overflow: scroll; color: red; background: gray;">
<p>The quick brown fox jumped over the lazy dog.</p>
<p>The quick brown fox jumped over the lazy dog.</p>
<p>The quick brown fox jumped over the lazy dog.</p>
</div>