Making the main scrollbar always visible

Deniz Dogan picture Deniz Dogan · Jul 29, 2009 · Viewed 266.2k times · Source

What CSS is required to make the browser's vertical scrollbar remain visible when a user visits a web page (when the page hasn't enough content to trigger the scrollbar's activation)?

Answer

Corv1nus picture Corv1nus · Jul 29, 2009
html {
    overflow: -moz-scrollbars-vertical; 
    overflow-y: scroll;
}

This make the scrollbar always visible and only active when needed.

Update: If the above does not work the just using this may.

html {
    overflow-y:scroll;
}