iframe youtube video responsive with css

just add this below div along with class video-container format like…

<div class="video-container"><iframe.......></iframe></div>

then put the below css in your site header

.video-container {
	position:relative;
	padding-bottom:56.25%;
	padding-top:30px;
	height:0;
	overflow:hidden;
}

.video-container iframe, .video-container object, .video-container embed {
	position:absolute;
	top:0;
	left:0;
	width:100%;
	height:100%;
}



Leave a Reply

Your email address will not be published. Required fields are marked *