"Responsive YouTube Player"
Bootstrap 3.1.0 Snippet by mrmccormack

<!-- Reference: http://avexdesigns.com/responsive-youtube-embed/ --> <div class="container"> <div class="row"> <h3>Mr. M.'s Responsive YouTube Player</h3> <p> <strong><mark>Update!</mark> See how Bootstrap 3.2 makes this easy</strong> <a href="http://bootsnipp.com/mrmccormack/snippets/d2DzN">Mr. M.'s YouTube/Vimeo Responsive Embeds - Bootstrap 3.2</a> </p> <p> <a href="http://bootsnipp.com/iframe/6bDM" target="_blank">View Full Screen</a> </p> <hr> </div><!--.row --> </div><!--./container --> <div class="container"> <div class="row"> <div class="col-md-4"> <h4>Lorem Ipsum</h4> <p> Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p><img src="http://farm7.staticflickr.com/6043/6311448642_841c424a65.jpg" class="img-responsive center-block" alt="tv"> <p> <small>Image: <a href="http://www.flickr.com/photos/photography_and_design/6311448642/sizes/l/" target="_blank">Jonas' Design</a><br> <a href="http://tinyurl.com/tbvalid8" target="_blank">HTML 5 Valid</a></small> </p> </div><!--.col --> <div class="col-md-8"> <div class="vid"> <iframe width="560" height="315" src="//www.youtube.com/embed/ac7KhViaVqc" allowfullscreen=""></iframe> </div><!--./vid --> </div><!--.col --> </div><!--./row --> </div><!--./container -->
/* Reference: http://avexdesigns.com/responsive-youtube-embed/ */ .vid { position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden; } .vid iframe, .vid object, .vid embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

Similar snippets: See More


Comments:

comments powered by Disqus