Dealing with Spills

example of overflow scrolling

We saw an example on the combing size types, where the text inside an element “overflowed” its containing box. We can choose to address this situation in a couple of ways:

  1. Ignore it (boo!).
  2. Resize our elements so they fit the content.
  3. Tell the browser what to do with extra content.

In the latter option, we will use the “overflow” CSS property (overflow: ). This property takes one of three values:

  • visible; this is the default.
  • hidden; overflow content will be hidden.
  • scroll; scroll bars will be provided for overflow content.