megwoo
6/25/2015 - 7:20 PM

video, iframe, responsive, wrapper

video, iframe, responsive, wrapper

.videoWrapper {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	padding-bottom: 75%;  /* 420w/315h youtube */
	padding-top: 25px;
	height: 0;
}
.videoWrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

// jquery to wrap iframe with wrapper
$('.std iframe').wrap('<div class="videoWrapper" />');