views:

64

answers:

2

I have a popup that displays some results, and I want a scroll bar to be display since the results are being cutt off (and I don't want the popup to be too long).

+5  A: 

You need to add style="overflow-y:scroll;" to the div tag. (This will force a scrollbar on the vertical).

If you only want a scrollbar when needed, just do overflow-y:auto;

webdestroya
+3  A: 
<div class="scrollingDiv">foo</div> 

div.scrollingDiv
{
   overflow:scroll;
}
gmcalab
@webdestroya: It will only add scrolling to divs that have the classname of "scrollingDiv". That could be as few as 1, or even 0, or as many as all the divs the designer wishes to have scrollbars.
Robusto
Well, now it will that you've updated it :)
webdestroya
@webdestroya: I didn't touch it. And the post didn't show as being edited when I commented. W/e.
Robusto
@Robusto - I think he was referring that I edited it. Because I did edit it to make it more clear.
gmcalab
@Robusto - Yea, I meant gmcalab edited it. Originally it just said `div` in the spec, it didn't have the class. Either way, I removed my comment because it is now fixed.
webdestroya