CSS Layout – Overflow

The CSS overflow property controls what happens to content that is too big to fit into an area.

CSS Overflow

The overflow property specifies whether to clip the content or to add scrollbars when the content of an element is too big to fit in the specified area.

The overflow property has the following values:

  • visible – Default. The overflow is not clipped. The content renders outside the element’s box
  • hidden – The overflow is clipped, and the rest of the content will be invisible
  • scroll – The overflow is clipped, and a scrollbar is added to see the rest of the content
  • auto – Similar to scroll, but it adds scrollbars only when necessary

Continue reading CSS Layout – Overflow

Styling Scrollbars

With the scrollbar-color property you can change the colors used for scrollbars. You can specify the color of the thumb and the color track with it. Using scrollbar-width you can opt-in to a narrower scrollbar, or even to hide the scrollbar completely without affecting scrollability. Continue reading Styling Scrollbars