HTML & CSS · Senior · Question 13 of 75

How does overflow: clip differ from overflow: hidden?

Explanation

overflow: hidden makes the element a scroll container (it can be scrolled programmatically), so sticky descendants start sticking to it. clip simply clips painting, forbids any scrolling and doesn't create a BFC. Axes can be controlled separately (overflow-x: clip), and a clip margin can be set with overflow-clip-margin.

Further reading

Problem with a question

HTML & CSS · Senior · question 13

Test yourself

Take the HTML & CSS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz