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 trialJack Fitzgibbon
7,607 PointsNavigation problem.
Hello, When I activate my slide out navigation the body content can be scrolled, I don't want this. I have tried overflow-x: hidden; but for some reason that doesn't seem to work. Any suggestions would be appreciated.
5 Answers
Jason Brooks
1,362 PointsTry this for your wrapper:
.wrapper { max-width: 960px; margin: 0 auto; position: fixed; left: 300px; }
I suppose, properly, it should also have a "top: xxx px;" as well. But this seems to work.
Pedro Cabral
Full Stack JavaScript Techdegree Student 23,916 PointsShouldn't it be either overflow or overflow-y?
Jack Fitzgibbon
7,607 PointsNo, because it allows me to scroll horizontally (x)
Pedro Cabral
Full Stack JavaScript Techdegree Student 23,916 PointsI assumed you were referring to the vertical scrollbar. Your (untouched) CodePen doesn't show me a horizontal scroll bar even when the menu is popped out.
Jack Fitzgibbon
7,607 PointsPedro Cabral, try copying the code into a text editor and viewing it in the browser.
Pedro Cabral
Full Stack JavaScript Techdegree Student 23,916 PointsNo issues, see here. I added the normalize as well and nothing shows up - tested in Chrome, IE and Firefox - is the content from main.css what you pasted on CodePen?
Jack Fitzgibbon
7,607 PointsPedro Cabral, I know that no scroll bars appear but it still lets me scroll, doesn't it let you?
Jack Fitzgibbon
7,607 PointsPedro Cabral, I know that no scroll bars appear but it still lets me scroll, doesn't it let you?
Jack Fitzgibbon
7,607 PointsJack Fitzgibbon
7,607 PointsThank you! It worked! :)
Jason Brooks
1,362 PointsJason Brooks
1,362 PointsGlad to hear it! Although, if the transition is smooth enough, your original was kinda cool.