NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix b » css1 / css2 properties

overflow


This property determines an element's behavior when its content doesn't fit into the space defined by the element's other properties. Possible values are visible, hidden, scroll, auto or inherit. By default, content will be visible, but a value of hidden will clip content that extends past the defined region size. A value of scroll adds scroll bars appropriately so content can be viewed.

Examples


#div1 {position: absolute; left: 20px; top: 20px;
width: 100px; height: 100px; overflow: scroll;}
#div2 {height: 100px; width: 100px; overflow: hidden;}

Browser and CSS Support Notes


CSS2
IE 4, 5, 5.5 (buggy), 6
Nav 4, 4.5-4.8 (buggy), 6, 7
Opera 4, 5, 6, 7

TIP Printing content in a region with overflow set to scroll can be troublesome.

(X)HTML Elements
CSS Properties
Back: outline properties Next: padding properties
< Home | About | Chapters | Examples | Errata | Reference | Site Map >