Could anyone shed some light upon the source of the 8px whitespace at the bottom of the element box when inspected with DevTools?
/* No stylesheet - all CSS from DevTools on Chrome user agent stylesheet */
element.style {}
html {
display: block;
}
head {
display: none;
}
body {
display: block;
margin: 8px;
}
p {
display: block;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
}
<html>
<head></head>
<body>
<p>Hello, world</p>
</body>
</html>
Highlighting the <html>
element box with DevTools shows its vertical dimension to be 189px:
Whilst from DevTools, the highlighted <body>
element box has a total vertical dimension of 181px (including margins).
Why does the <html>
element box extend down by 8px beyond the <body>
element box at the bottom of the page?
` element (as can be seen in my posted codesnippet). Hence, setting body margins to 0 would not have solved the issue.
– Sep 08 '22 at 16:49