Dealing with Spills
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:
- Ignore it (boo!).
- Resize our elements so they fit the content.
- 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.
- Previous
- Next