Overflow Guard — CSS

Tame overflowing content: 18 levels of overflow, scroll, clip and text-overflow. A CSS overflow game for mastering tight containers.

What you learn in this game

The overflow property controls what happens when content is too big for its container. By default, content spills out (visible). We can hide it, make it scroll, or let it be.

To clip long text with an ellipsis ("..."), you need three properties at once: overflow hidden, white-space nowrap, and text-overflow ellipsis. All three have to work together.

You can set overflow separately for the horizontal direction (overflow-x) and the vertical (overflow-y). Useful when you want to scroll in only one direction.

CSS Variables (Custom Properties) let you store a value in a variable you can reuse. A variable is written with a -- prefix and called with the var() function.

The calc() function allows math in CSS. You can mix different units like % and px. Important: use spaces around the operators (+, -, *, /).