×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
0
Language: CSS
Posted by: Nicole Patten
Added: Aug 31, 2016 7:31 PM
Views: 10
Tags: no tags
wrap iframe in div.videoWrapper
  1. .videoWrapper {
  2.         position: relative;
  3.         padding-bottom: 56.25%; /* 16:9 */
  4.         padding-top: 25px;
  5.         height: 0;
  6. }
  7. .videoWrapper iframe {
  8.         position: absolute;
  9.         top: 0;
  10.         left: 0;
  11.         width: 100%;
  12.         height: 100%;
  13. }