Jump to content

Stop vertical scroll bar from pushing page


DarkxPunk
 Share

Recommended Posts

Hey everyone, I have no idea how to do this honestly but there must be a way. All I want is when a scroll bar appears to not push the content to the left. Keep it in the same position but show the scroll bar. There must be a way. Have it offset the page by x if overflow occurs? Any help would be appreciated.Thanks.

Link to comment
Share on other sites

You can do it with just CSS. Use "position:fixed;" on the element you want frozen when scrolling.

Link to comment
Share on other sites

I want it to scroll, I just don't want it to push the content to left. Because it pushes the content to make room for the scroll bar.

Edited by DarkxPunk
Link to comment
Share on other sites

because differnt browsers use different widths for scrollbars, and some show scrollbar all the time, while others show when content becomes larger than height of browser window, you might want to show scroll bar (disabled for little or no content) all the time with html {overflow-y: scroll;}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...