Dave Stewart Posted September 14, 2014 Share Posted September 14, 2014 (edited) Hi everyone, I'm a bit of a newbie so bear with me. I'm trying to figure out how to get scroll bars on one div within a page. Anyone know? I have three divs, one accross the top with a header etc, one main div with the body, & one footer at the bottom. All works but the scroll bars move the content of the bottom div, which is annoying. Any ideas? I know it can be done & is probably really simple but I'm a newbie! Thanks in anticipation. Dave Edited September 14, 2014 by Dave Stewart Link to comment Share on other sites More sharing options...
davej Posted September 14, 2014 Share Posted September 14, 2014 See... http://www.w3schools.com/cssref/pr_pos_overflow.asp Link to comment Share on other sites More sharing options...
Dave Stewart Posted September 14, 2014 Author Share Posted September 14, 2014 I've tried using that but it still gives the scrolls over the height of the browser window, which knocks all the other divs aside several pixels. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 14, 2014 Share Posted September 14, 2014 The div must be given a set height, then you can use overflow-y: auto; which produce vertical scrollbar only when content exceeds given height. Link to comment Share on other sites More sharing options...
Dave Stewart Posted September 24, 2014 Author Share Posted September 24, 2014 Sorry it took me so long to get this sorted, but managed with your help. Thanks a lot. 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