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

Design Prototyping in the Browser Design Patterns Image Carousels

Sean Flanagan
Sean Flanagan
33,235 Points

Carousel won't transition

Hi.

The carousel refuses to transition to the next colour. Is there any reason for this?

https://w.trhou.se/3zpn7fico0

Cheers

Sean

1 Answer

Nick Pettit
STAFF
Nick Pettit
Treehouse Teacher

It is transitioning, but your carousel backgrounds are all the same color. I added these inline styles to demonstrate:

https://w.trhou.se/262gj9tsf6

Relevant code is here:

      <section id="featured" class="carousel slide" data-ride="carousel">
        <div class="carousel-inner">
          <div class="carousel-item active" style="background:red;">
            <img src="#">
          </div>
          <div class="carousel-item" style="background:blue;">
            <img src="#">
          </div>
          <div class="carousel-item">
            <img src="#">
          </div>
        </div>
      </section>
Sean Flanagan
Sean Flanagan
33,235 Points

Hi Nick.

I copied your code into my index.html and now the transition is working perfectly.

I've upvoted your post and given it Best Answer.

Thank you

Sean

Thanks, Nick!