Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Weird overflow - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
8mo ago
•
2 replies
Koner
Weird overflow
I
'm confused
: why is there an overflow and the scrollbar is displayed
? The container only has a height of
20%
20%
and the margin is
2rem
2rem
, which is way below the viewport height
, right
?
https://jsfiddle.net/KonerDev/u8jb3fmk/4/
In the devtools it looks like the body has been shifted down by 2rem
. I
'd like to understand what
's causing this problem
? If I set the
2rem
2rem
as padding on the body
, everything works as intended
.
Edit fiddle - JSFiddle - Code Playground
JSFiddle
- Test your JavaScript
, CSS
, HTML or CoffeeScript online with JSFiddle
.
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
Problem with overflow-x
KP-C
Kevin Powell - Community / help
8mo ago
Circular element overflow issue
KP-C
Kevin Powell - Community / help
12mo ago
safari `translateZ` and `overflow: hidden`
KP-C
Kevin Powell - Community / help
4mo ago
Overflow and container best practices
KP-C
Kevin Powell - Community / help
9mo ago