Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Framework Basics Build a Website with Bootstrap Adding the Video Modal and Footer

For anyone having an issue with the Video Modal....

When I first added the HTML for the Video Modal and previewed the site, the video came up as a square and wouldn't display properly. After tweaking for a while I figured out a solution:

  1. Go back to Bootstrap Customize, upload your config.json file for the previous settings when you last downloaded a Custom Bootstrap a few videos ago. Add "Responsive Embed". Re-Compile and Download. Replace your old bootstrap.min.css and bootstrap.css with your new one in your CSS folder.

  2. Use this code for the video modal:

<!-- Video Modal -->
    <div class="modal fade" id="videoModal">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title">Learn how to make this app!</h4>
          <div class="modal-body">
            <div class="embed-responsive embed-responsive-16by9">
              <iframe class="embed-responsive-item" src="http://www.youtube.com/embed/hTf0CgRC1_Q"></iframe>
    </div><!-- End Video Modal -->

This uses Bootstrap's Responsive Embed component.(www.getbootstrap.com/components/#responsive-embed)

2 Answers

Amazing! This fixed the issue straight away. Thanks!