Overflow-y scroll question
I have the overflow-y:scroll
option for a div with text. However, the scroll "space" (for lack of a better word for it) appears whether the text requires scrolling or n开发者_StackOverflow社区ot. How do I make the appearance of the scroll "space" conditional on whether the text has a long enough height?
Change scroll
to auto
This value is browser and media dependent, but should allow for a vertical scrollbar if possible in case of overflow.
http://www.css3.com/css-overflow-y/
scroll
means to always show the scrollbar; auto
means to show it when necessary. Change it to auto
instead.
精彩评论