Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Alex Chow
4,521 PointsScroll Bar Troubles
Hi there,
I have modal windows that display more detailed images for my portfolio pieces. I added a scroll bar when the window is open so the user can scroll through the overflowing content. I added some lines of code to the jquery plugin to hide the scroll bar on the body when it opens:
$('Body').css('overflow','hidden');
and make it visible again when the modal window is closed:
$('Body').css('overflow','scroll');
This solution works well with browsers on a mac but specifically the google chrome browser on a pc makes the site "jump" or shift left and right whenever I open and close it. I wanted to know if there is a better solution for this problem.