Last active
December 12, 2015 08:09
-
-
Save LeeRJohnson/4742280 to your computer and use it in GitHub Desktop.
Methods for controlling the scaling of video in a theme using Foundation.
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
<div class="row"><!-- not really need - row should exist higher in the doc --> | |
<div class="six columns centered"><!-- six is the width (half) but could be one through tweleve - centered centers it --> | |
<div class="flex-video widescreen"><!-- widescreen is for the 560 315 ratio --> | |
<iframe width="560" height="315" src="http://www.youtube.com/embed/N966cATFWjI" frameborder="0" allowfullscreen=""></iframe> | |
</div> | |
</div> | |
</div> |
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
/* Stop over scaling */ | |
.flex-video iframe, .flex-video object, .flex-video embed, .flex-video video { | |
max-width: 420px; | |
max-height: 315px; | |
} | |
.flex-video.widescreen iframe, .flex-video.widescreen object, .flex-video.widescreen embed, .flex-video.widescreen video{ | |
max-width: 560px; | |
} | |
.flex-video.widescreen.vimeo iframe, .flex-video.widescreen object.vimeo, .flex-video.widescreen.vimeo embed, .flex-video.widescreen.vimeo video { | |
max-width: 400px; | |
max-height: 225px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment