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
glenn romaniuk
33,738 Pointshow to transition page off screen
I've seen some slidebars and other designs where they slide the entire page or a portion of the page off the screen. I've found several slidebar example. What i'm wanting to do is when a menu item is click slide out further to a sub menu item, and so on. To get me started how is it possible to set the width of an element to wider than what can display and then only display a portion of it?
1 Answer
Trent Guillory
1,799 PointsYou could set the width of a div to 500px for example, and then move it halfway off-screen using a negative margin like -250px. This would require changing the positioning type also.