JSFiddle - React, Tailwind, and code Playground
HTML
<div id="div1">123</div>
<div id="div2">456</div>
CSS
#div1{
background: red;
position:absolute;
height:100%;
width:20px;
top:0;
left:0;
}
#div2{
width:100%;
height:500px;
background-color:green;
margin-left: 20px;
}
@media screen and (min-aspect-ratio: 1/1) {
#div1 {
width: 100%;
height: 20px;
}
#div2 {
width: 100%;
margin: 0;
}
}