I am trying to create a div element that has a width equal to the viewport of the browser. However, I am encountering issues when applying the CSS property width:100vh to the body element. Here is my code snippet:
body {
font-family: Staatliches;
font-size: 25px;
overflow: hidden;
margin: 0;
height: 100vh;
width: 100vh;
}
.bg {
height: 100vh;
/* width: 100%; */
width: 100vh;
background-color: red;
}
<div class="bg"></div>