The overflow property in action
This div’s overflow is set to visible. This may at times be desirable, but at other times there would be a risk of content overflowing other pages elements. Note that some browsers may expand the div to accommodate the content rather than allowing it to overflow.
The width of the p element has been set wider than the width of the div to provide horizontal as well as, hopefully, vertical overflow.
This div’s overflow is set to hidden. Any content extending beyond the edges of the div will be inaccessible. This would rarely be a good thing.
The width of the p element has been set wider than the width of the div to provide horizontal as well as, hopefully, vertical overflow.
This div’s overflow is set to scroll.
The width of the p element has been set narrower than the width of the div to demonstrate that the appearance of scroll bars is mandatory whether or not the content overflows.
This div’s overflow is set to auto. What happens depends on the user agent (browser) — it should produce a scroll bar when necessary.
The width of the p element has been set narrower than the width of the div to demonstrate that the appearance of scroll bars depends upon whether or not the content overflows.
