Created
October 31, 2012 14:02
-
-
Save maxxscho/3987183 to your computer and use it in GitHub Desktop.
Responsive embeded video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- Add classes for each IE to the HTML Tag --> | |
<!--[if lt IE 7 ]><html class="ie ie6 no-js"> <![endif]--> | |
<!--[if IE 7 ]><html class="ie ie7 no-js"> <![endif]--> | |
<!--[if IE 8 ]><html class="ie ie8 no-js"> <![endif]--> | |
<!--[if (gte IE 9)|!(IE)]><!--><html class="no-js"> <!--<![endif]--> | |
<head> | |
<title>Responsive Video</title> | |
<meta charset="UTF-8"/> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<meta name="author" content=""> | |
<style type="text/css"> | |
.elastic-video { | |
position: relative; | |
height: 0; | |
padding-bottom: 54%; /* Play with the percent between 50% and 60% too minimize the black borders */ | |
padding-top: 15px; | |
overflow: hidden; | |
} | |
.elastic-video iframe { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"><!-- your responsive container --> | |
<div class="elastic-video"> | |
<iframe src="http://player.vimeo.com/video/27359051?byline=0&portrait=0" width="610" height="343" frameborder="0"></iframe> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment