Responsive iframe WordPress

https://benmarshall.me/responsive-iframes/

div class=”iframe-container” iframe src=”” allowfullscreen /iframe /div

.iframe-container {
overflow: hidden;
padding-top: 56.25%;
position: relative;
}

.iframe-container iframe {
border: 0;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}

/* 4×3 Aspect Ratio */
.iframe-container-4×3 {
padding-top: 75%;
}

You may also like...