Skip to content

Instantly share code, notes, and snippets.

@LeeRJohnson
Last active December 12, 2015 08:09
Show Gist options
  • Save LeeRJohnson/4742280 to your computer and use it in GitHub Desktop.
Save LeeRJohnson/4742280 to your computer and use it in GitHub Desktop.
Methods for controlling the scaling of video in a theme using Foundation.
<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>
/* 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