.aspect-ratio { position: relative; width: 100%; height: 100vh; padding-bottom: 100%; } .aspect-ratio iframe { position: absolute; width: 100%; height: 100vh; left: 0; top: 0; }