<html>
<head>
<style>
.outerbox
{
display: block;
margin: 0 auto;
margin-top: 10px;
max-width: 640px;}
.video-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
}
.video-container iframe,
.video-container object,
.video-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
<body>
<div class=”outerbox”>
<div class=”video-container”>
<iframe src=”http://www.youtube.com/embed/your-video-id-here” frameborder=”0″ width=”560″ height=”315″></iframe>
</div>
</div>
</body>
</html>
Working Youtube Responsive Videos Css
0 Comments
Oldest