CSS:overflow
From MDC
(Redirected from CSS:scroll)
[edit] Summary
overflow property specifies whether to clip content, render scroll bar or display overflow content of a block-level element.
- Initial value:
visible - Applies to: non-replaced block-level elements, table cells, and inline-block elements
- Inherited: no
- Percentages: n/a
- Media:
visual - Computed value: as specified
[edit] Syntax
overflow: visible | hidden | scroll | auto | inherit
[edit] Values
visible- Browser display overflow content without clipping, by rendering outside the element as a spill over.
hidden- overflow content will be clipped, and no scrolling mechanism provided
auto- scrollbars (a scrolling mechanism) will be automatically rendered to view content when it overflows.
scroll- scrollbars will be rendered always regardless of whether content overflows or not. This can be used to avoid any problems with scrollbars appearing and disappearing in a dynamic environment.
inherit-moz-scrollbars-horizontal-moz-scrollbars-none-moz-scrollbars-vertical-moz-hidden-unscrollable
Note: All of these -moz-* values should be considered deprecated. Use of the overflow-x and overflow-y is preferred, although it does not replace the last of these.
[edit] Examples
.sidebox {
width: 300px;
overflow: auto;
}
[edit] Notes
[edit] Specifications
[edit] Browser compatibility
(Sample Compatibility Chart)
| Browser | Lowest Version |
|---|---|
| Internet Explorer | ? |
| Firefox | 1 |
| Netscape | ? |
| Opera | ? |
| Safari | ? |