I made some extremely basic html code, and for some reason there is a padding comming from nowhere :
Now I don't understand at all why is there a background empty space between the top of the page and the top of the grey box, as well as on the sides of the grey box. Isn't Witdh: 100% supposed to take all the space available (A.K.A. 1920px instaed of 1904px) ?
the code :
<html lang= "fr">
<style>
:root {
--bgcolor: #101B20;
}
html {
background-color: var(--bgcolor);
width: 100%;
height: 100%;
border: 0px;
}
p {
font-size: 16px;
color: #FFFFFF;
font-family:'Open Sans', sans-serif;
text-align: center;
}
.sticky_square {
height: 50px;
width: 100%;
background-color: #808080;
}
</style>
<head>
<link rel="icon" href="images/tarkov icon.png">
<title>THIS IS A TEST</title>
<meta charset="utf-8"/>
</head>
<body>
<div class=sticky_square>
<p>txt</p>
</div>
<p>txt2</p>
</body>
` tag features inherent margin, and/or some browsers provide a preceding blank line. [Another answer along these lines](https://stackoverflow.com/a/819190/6340496).
– S3DEV Mar 18 '23 at 19:55is inside the div container so it shouldn't interact with the grey box
– the shadow Mar 18 '23 at 19:56` element's margin is going out of its parent `