This piece of code is not compatible with any version of Internet Explorer:
main {
position: relative;
}
div {
position: absolute;
height: 300px;
background-color: red;
width: 100%;
}
<main>
<div></div>
</main>
I attempted using width 100vw
but encountered a horizontal scrolling issue if the page exceeded the viewport size. I also experimented with something like width calc(100vw - vertical_scroll_width) but it proved unsuccessful when there was no vertical scroll present on the page.