Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to always show the vertical scrollbar in a browser?

Tags:

html

browser

css

I want to always show vertical scrollbar in my webpage. Is it possible using javascript? I think it is possible using javascript or jQuery. I want vertical scrollbar whether there is enough content to show or not.

thanks.

like image 949
gautamlakum Avatar asked Oct 29 '10 08:10

gautamlakum


People also ask

How do I make my scroll bar always show?

Make sure overflow is set to "scroll" not "auto." With that said, in OS X Lion, overflow set to "scroll" behaves more like auto in that scrollbars will still only show when being used.

How do I make my Web page scroll vertically?

Basic Vertical Scroll Box To make a scroll box with a vertical scroll, you need to use overflow-y:scroll; . This tells your browser to create scroll bars on the y (vertical) axis whenever the contents of the container is too big/high.


1 Answers

jQuery shouldn't be required. You could try adding the CSS:

body    {overflow-y:scroll;} 

This works across the latest browsers, even IE6.

like image 200
Coin_op Avatar answered Sep 20 '22 05:09

Coin_op