DarkxPunk Posted July 2, 2012 Share Posted July 2, 2012 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 More sharing options...
boen_robot Posted July 2, 2012 Share Posted July 2, 2012 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 More sharing options...
DarkxPunk Posted July 2, 2012 Author Share Posted July 2, 2012 (edited) 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 July 2, 2012 by DarkxPunk Link to comment Share on other sites More sharing options...
dsonesuk Posted July 2, 2012 Share Posted July 2, 2012 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 More sharing options...
DarkxPunk Posted July 2, 2012 Author Share Posted July 2, 2012 Interesting idea. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now