CSS overflow Property
Complete CSS Reference
Definition
The overflow property sets what happens if the content of an element overflow its area.
Inherited: No
JavaScript Syntax
CSS properties can also be dynamically changed with a JavaScript.
Scripting Syntax: object.style.overflow="hidden"
In our HTML DOM tutorial you can find more details about the
overflow property.
In our HTML DOM tutorial you can also find a full
Style Object Reference.
Example
Possible Values
Value |
Description |
visible |
Default. The content is not clipped. It renders outside the element |
hidden |
The content is clipped, but the browser does not display a
scroll-bar to see the rest of the content |
scroll |
The content is clipped, but the browser displays a
scroll-bar to see the rest of the content |
auto |
If the content is clipped, the browser should display a
scroll-bar to see the rest of the content |
Try-It-Yourself Demos
How to show
overflow in an element using scroll
This example demonstrates how to set the overflow property to create a scroll
bare when an element's content
is too big to fit in a specified area.
How
to hide overflow in an element
This example demonstrates how to set the overflow property to hide the content
if it is too big to fit in a specified area.
How to
show set the browser to automatically handle overflow
This example demonstrates how to set the browser to automatically handle
overflow.
Complete CSS Reference
|
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The JavaScript Certificate is for developers who want to document their knowledge of JavaScript and the HTML DOM.
The XML Certificate is for developers who want to document their knowledge of XML, XML DOM and XSLT.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
The PHP Certificate is for developers who want to document their knowledge of PHP and SQL (MySQL).
|
|