<div class="wrapper">
<div>
<div class="box box16x9">16x9</div>
<div class="box box4x3">4x3</div>
</div>
<div>
<div class="box box16x9">16x9</div>
<div class="box box4x3">4x3</div>
</div>
</div>
:root {
--light-gray: hsla(300, 4%, 81%, 1);
--ghost-white: hsla(225, 100%, 99%, 1);
--davys-grey: hsla(12, 5%, 36%, 1);
--blue-sapphire: hsla(196, 67%, 33%, 1);
--charcoal: hsla(207, 38%, 25%, 1);
}
/* from https://coolors.co/d0ccd0-fbfcff-605856-1c6e8c-274156*/
* {
box-sizing: border-box;
}
body {
background-color: var(--charcoal);
font: 1.2em/1.3 Roboto, sans-serif;
}
.wrapper {
box-sizing: border-box;
width: 960px;
height: 540px;
margin: 100px auto;
background-color: var(--ghost-white);
display: grid;
grid-template-columns: 200px 350px;
gap: 20px;
justify-content: center;
padding: 20px;
}
.box {
background-color: hsla(196, 67%, 33%, .2);
border: 1px solid hsla(196, 67%, 33%, 1);
margin: 20px;
}
.box {
padding: 10px;
}
.box16x9 {
aspect-ratio: 16/9;
}
.box4x3 {
aspect-ratio: 4/3;
}
.wrapper > * {
border: 2px dotted var(--charcoal);
padding: 10px;
}
This Pen doesn't use any external JavaScript resources.