JSFiddle - React, Tailwind, and code Playground

HTML

<body>

<div class="wrapper">
  <div class="main">
    This is your div with the specified aspect ratio.
  </div>
</div>
<div class="wrapper">
  <div class="main2">
    div2.
  </div>
</div>
<div class="wrapper2">
  <div class="main3">
    This is your div with the specified aspect ratio.
  </div>
</div>

CSS

html,body {
        padding:0;
        margin:0;
        height:100%;
        min-height:100%;
        width: 100%;   
        min-width: 100%;
      }
.wrapper {
  width: 50%;
  /* whatever width you want */
  display: inline-block;
  position: relative;
  
}
.wrapper:after {
  padding-top: 56.25%;
  /* 16:9 ratio */
  display: inline-block;
  content: '';
}
.wrapper2 {
  width: 100%;
  /* whatever width you want */
  display: inline-block;
  position: relative;
}
.wrapper2:after {
  padding-top: 56.25%;
  /* 16:9 ratio */
  display: inline-block;
  content: '';
}
.main {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  /* fill parent */
  background-color: deepskyblue;
  /* let's see it! */
  color: white;
}
.main2 {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  /* fill parent */
  background-color: green;
  /* let's see it! */
  color: white;
}
.main3 {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  /* fill parent */
  background-color: orange;
  /* let's see it! */
  color: white;
}