Skip to content

Instantly share code, notes, and snippets.

@jgarber
Created April 4, 2012 14:57
Show Gist options
  • Save jgarber/2302238 to your computer and use it in GitHub Desktop.
Save jgarber/2302238 to your computer and use it in GitHub Desktop.

Revisions

  1. jgarber created this gist Apr 4, 2012.
    1 change: 1 addition & 0 deletions MIT-LICENSE.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    Copyright (c) 2011 ZURB, http://www.zurb.com/
    24 changes: 24 additions & 0 deletions responsive-video.css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    .flex-video {
    position: relative;
    padding-top: 25px;
    padding-bottom: 67.5%;
    height: 0;
    margin-bottom: 16px;
    overflow: hidden;
    }

    .flex-video.widescreen { padding-bottom: 57.25%; }
    .flex-video.vimeo { padding-top: 0; }

    .flex-video iframe,
    .flex-video object,
    .flex-video embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    }
    @media only screen and (max-device-width: 800px), only screen and (device-width: 1024px) and (device-height: 600px), only screen and (width: 1280px) and (orientation: landscape), only screen and (device-width: 800px), only screen and (max-width: 767px) {
    .flex-video { padding-top: 0; }
    }