

auto - the browser determines how it will handle the content, it can vary from browser to browser, but generally, scrollbars appear as required. The overflow-x property specifies whether to clip the content, add a scroll bar, or display overflow content of a block-level element, when it overflows at the left and right edges.scroll - content gets clipped and necessary scrollbars are shown, overflow-y specifies what happens when content overflows vertically (from top to bottom).hidden - content gets clipped and no scrollbars are shown,.visible - content can be rendered outside of the box,.The overflow property can have different values: If the user zooms in, they can still pan around but the layout viewport will not scroll from.
When learning about this, it is useful to know a little something more about positioning. Use the html and css from your second example except move thehidden: Content that overflows is hidden. No content is clipped when its bigger than its set dimensions. Values visible: This is the default value of the property. The overflow-x property specifies handling the overflow in the horizontal direction, while overflow-y specifies handling the overflow in the vertical direction. With overflow, you can control whether to clip content or add scrollbars when an element’s content is too big to fit in a specified area. The overflow property is a shorthand for overflow-x and overflow-y. overflow-hidden on an element with set width and height dimensions.

You should understand that default CSS avoids making overflowing content invisible.

Explanation of your CSS: margin: 0 auto horizontally aligns the element at the center overflow:hidden prevents scrollbars from appearing width:980px sets the width of the element to be 980px. It specifies if a scrollbar should appear, or if a content gets clipped. This lesson introduced the concept of overflow. overflow:hidden prevents scrollbars from showing up, even when they're necessary. The CSS overflow property specifies what to do in the case a content is too large to fit in the container box.
