Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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!