Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<title>CSS Overflow Reference: Root element's scrollbar-gutter is accounted for in fixed-pos positioning</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
<style>
:root {
scrollbar-gutter: stable both-edges;
}
body {
margin: 0;
}
.fixed {
width: 100px;
height: 100px;
background: green;
position: absolute;
}
</style>
<div class="fixed" style="left: 0"></div>
<div class="fixed" style="right: 0"></div>