Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Why div around flex-container breaks overflow scrolling? - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
3y ago
•
3 replies
john_galt
Why div around flex-container breaks overflow scrolling?
I
'm trying to make the flex
-item be scrollable
, but when adding wrapper div around flex
-container the scroll is break and the entire page is scolling instead of content in flex
-item
Example without div wrapping flex
-container
:
https://codepen.io/Dimi_0-o/pen/qBJmKKN
If uncomment
div
div
around
.container
.container
, then
html
html
start to overflowing instead of
flex-item
flex-item
Why is this happening
? What css spec
/mdn part of CSS can I read to understand that behavior
?
CodePen
Dimi
qBJmKKN
.
.
.
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Text overflow ellipses for a flex container
KP-C
Kevin Powell - Community / front-end
3y ago
Issues with overflow and in a flex grow container
KP-C
Kevin Powell - Community / front-end
3y ago
A div who overflow
KP-C
Kevin Powell - Community / front-end
3y ago