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!
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

Amandeep Pasricha
14,932 PointsWhat is implied by a vertical scroll?
When a vertical scroll appears, does this mean that the content is outside of a device's viewport?
3 Answers

Steven Parker
228,131 PointsThat would generally be true for the window itself as long as that behavior has not been overridden.
But you can also have scrollbars on elements. An "auto" scrollbar will appear anytime the content is greater than the nearest containing element, which could potentially be smaller (or larger) than the viewport.
There are also property settings that causes the scrollbar to be visible at all times.

Amandeep Pasricha
14,932 PointsSteven Parker But I don't understand what was wrong with the vertical scroll in the first place. Isn't the footer technically still in the browser's viewport? Is the term viewport only concerned with what we can see currently at THIS very moment on the screen? Because I don't see why the footer was not in the browser's viewpoint even when the vertical scroll was required.
In conclusion: would we say that any content that can only be seen with the help of a scroll bar, is outside of the device's viewport?

Steven Parker
228,131 PointsWhat I was trying to explain the first time is that there are many causes for a scroll bar, and some are completely unrelated to the viewport size. So having one doesn't imply anything you can rely on.
But you're right, the "viewport" is the visible area of the page, which varies with the device.

Amandeep Pasricha
14,932 PointsSteven Parker Okay, in this example, did an "auto" scroll-bar appear as a result of content being shorter than the nearest containing element, which I'm guessing was <body>?

Steven Parker
228,131 PointsI don't know what you are referring to by "this example".
Amandeep Pasricha
14,932 PointsAmandeep Pasricha
14,932 PointsSteven Parker Okay so when content is displayed on the iPhone and everything looks fine in terms of padding and width, if there is a vertical scroll, we would say that vertical content is outside of the viewport. But so far, we've been setting width viewports to avoid horizontal scrolls, correct?
Steven Parker
228,131 PointsSteven Parker
228,131 PointsI don't recall all the examples in the course, but it's certainly more common for responsive designs to result in a vertical scrollbar but not a horizontal one.