The CSS Overflow module contains the features of CSS relating to scrollable overflow handling in visual media. In CSS overflow happens when the content of a box extends past one or more of the box's edges.
The CSS Overflow module contains the features of CSS relating to scrollable overflow handling in visual media. In CSS overflow happens when the content of a box extends past one or more of the box's edges.
There are two types of overflow that you might encounter in CSS. The first is described as ink overflow. This is the overflow of painting effects which do not affect layout or otherwise extend the scrollable overflow region, such as box shadows, border images, text decoration, overhanging glyphs, outlines, etc.
The overflow that we sometimes need to manage in CSS is described as scrollable overflow. This is the content appearing outside of the box for which scrolling mechanisms need to be provided. The overflow properties are how we can control what happens when content overflows a box.
The following interactive example shows how changing the value of the overflow
property, changes how the overflow of a fixed height box is dealt with.
overflow
overflow-block
overflow-inline
overflow-x
overflow-y
text-overflow
block-overflow
Experimental
line-clamp
Experimental
max-lines
Experimental
continue
Experimental
-webkit-line-clamp
Non-standard
Specification |
---|
CSS Overflow Module Level 3 # propdef-overflow |
scrollbar-width
and scrollbar-color
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Overflow