Quantcast
Viewing latest article 8
Browse Latest Browse All 28

Answer by Razan Paul for Resizing an iframe based on content

This answer is only applicable for websites which uses Bootstrap. The responsive embed feature of the Bootstrap does the job. It is based on the width (not height) of the content.

<!-- 16:9 aspect ratio --><div class="embed-responsive embed-responsive-16by9"><iframe class="embed-responsive-item" src="http://www.youtube.com/embed/WsFWhL4Y84Y"></iframe></div>

jsfiddle: http://jsfiddle.net/00qggsjj/2/

http://getbootstrap.com/components/#responsive-embed


Viewing latest article 8
Browse Latest Browse All 28

Trending Articles