Using 100dvh and 100dvw makes the body scrollable
I want the body to take all the available space on the screen. But I don't why it becomes scrollable instead of just stopping the edges.
I'm I doing something wrong ?


19 Replies
You do not need to set a width on body, it already takes full width by default, same as any other block level element
And you should probably also add in
margin:0; on the body since it comes with an 8px default marginSo I removed the width
But it's still scrollable up and down
I use normalize.css, it already has that
Aah i see, well, try add
If that does not solve the problem, it must be something overflowing
If this does not solve problem, share code on https://codepen.io
CodePen
An online code editor, learning environment, and community for front-end web development using HTML, CSS and JavaScript code snippets, projects, and web applications.
that solved the issue
maybe normalize.css is not good
maybe I should use reset.css instead ?
What i usually do is to take reset.css from meyerweb, then i customize it to my own preference
You shouldn't be useing any CSS resetin 2025. They're from a bygone era when browsers didn't even look remotely alike. Resets were used not only to have a consistent look across browsers but to also give the dev a consistent dev experience across browsers.
Since they were started being used, browsers have come together to bring a consistent experience to all. It's like how you don't use jQuery in 2025—almost everything it did is now part of the JS spec so you're loading extra code for literally no benefit.
the body had an 8px margin by default, by the way
@ἔρως ☝️

oh
im late and dummy then
You're late and not reading lol
i read, i didn't pay attention :/
Thanks for clarifiying
@13eck Question : What's a good practice to start your css file ?
https://www.youtube.com/shorts/2lyDv0wOQuQ
is this enough?
Kevin Powell
YouTube
Simplest CSS reset to prevent headaches
Get the code here: https://codepen.io/kevinpowell/pen/QWxBgZX
#css
--
Come hang out with other dev's in my Discord Community
💬 https://discord.gg/nTYCvrK
Keep up to date with everything I'm up to
✉ https://www.kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
📺 https://www.twitch.tv/kevinpowellcss
---
He...
@charset "UTF-8";
if you need compatibility with old browsers
which you may need
you usually don't see this, because usually isn't needed and most browsers assume utf-8
i would just go with the base reset
the other reset has several issues that kevin didn't talk about in the video
for example, kevin nukes the styles for <pre> and <code>, and ruins all <ul> and <ol> elements
also, there's a better image reset that he made a video about tooI’m on mobile but search for “Jen Simmon CSS Remedy”.
It’s old but she explains everything and why you might want to include it in your CSS
in 2025 it seems like starters are the new resets.
(I learnt a thing or two by reading Chris's starter description)
GitHub
GitHub - jensimmons/cssremedy: Start your project with a remedy for...
Start your project with a remedy for the technical debt of CSS. - GitHub - jensimmons/cssremedy: Start your project with a remedy for the technical debt of CSS.