3

I need to embed a youtube clip within a webpage and I use twitter bootstrap. How does one correctly actually use span correctly to embed the video?

There are so many resolutions out there! For example, if I choose span8 for the video - it would be ~620 pixels wide iframe video. This may be an issue with even smaller resolutions.

Bass Jobsen
  • 48,736
  • 16
  • 143
  • 224
user428900
  • 7,091
  • 6
  • 23
  • 18
  • Duplicate with: http://stackoverflow.com/questions/12166784/how-to-implement-a-responsive-youtube-embed-iframe-with-twitter-bootstrap – Bass Jobsen May 21 '13 at 11:32

1 Answers1

7

Set the width and height of the iframe relative to (100%) the containing div span*. Choose a span width which fits your design. If you enable the responsive features of twitter bootstrap, see: http://twitter.github.io/bootstrap/scaffolding.html#responsive the width of your span and so the iframe change with the resolution.

https://stackoverflow.com/a/12235638/1596547 shows how to make the size of the iframe responsive.

Example see: http://bootply.com/BassJobsen/61833

Community
  • 1
  • 1
Bass Jobsen
  • 48,736
  • 16
  • 143
  • 224