"YouTube/Vimeo Responsive Embeds updated"
Bootstrap 3.2.0 Snippet by mrmccormack

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!-- Reference
http://getbootstrap.com/components/#responsive-embed
NEW:
"As seen in SUIT CSS, we've added a few classes for creating responsive embeds.
They're great for proportionally scaling down YouTube videos and other iframe or embed elements"
-->
<div class="container">
<div class="row">
<h3>
Mr. M.'s YouTube/Vimeo Responsive Embeds - Bootstrap 3.2
</h3>
<p>
<a href="http://bootsnipp.com/iframe/d2DzN" target="_blank">View Full Screen </a> <i>(Req'd to test on mobile device)</i>
</p>
<hr>
</div><!--.row -->
</div><!--./container -->
<div class="container">
<div class="row">
<div class="col-md-4">
<h4>
Examples of Responsive Embeds, NEW to Bootstrap 3.2
</h4>
<p><strong>This UPDATES my
<a href="http://bootsnipp.com/snippets/featured/responsive-youtube-player" target="_blank">previous Bootsnipp example using custom CSS</a>, for Bootstrap 3.1.0.</strong>
</p>
<p>
You don't need to include <code>frameborder="0"</code> in your <code>iframe</code>s as Bootstrap 3.2 override that for you.
</p>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments:

<div class="embed-responsive embed-responsive-16by9">

<iframe class="embed-responsive-item" src="https://www.youtube.com/emb..." frameborder="0" allowfullscreen=""></iframe>
</div>

awariat () - 9 years ago - Reply 0


Hello, in Chrome it's working fine, but not in Mazilla =( Do I need to write some additional code?

Lily () - 10 years ago - Reply 0


What version of Mozilla? What Operating System? thanks for comment. Rob

mrmccormack () - 10 years ago - Reply 0


There is no difference in the behavior, but this one has no CSS, since the necessary code is NOW built into Bootstrap 3.2. Have a look at the old one, the extra CSS is there. Hope that answers your question. Thanks for asking.

mrmccormack () - 10 years ago - Reply 0


Hi Thanks for the post. However, I don't really see the difference. Please explain.

KDigitL () - 10 years ago - Reply 0