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

Bootstrap carousel height jumping

In the Framework Basics, Prototyping with Bootsrap lesson I created a carousel on the home page of the demo site.

However one of the carousel slides is slightly larger and causing the height of the carousel to jump larger and smaller depending on which slide is being viewed.

I noticed that this doesn't happen in the example video. I looked through my CSS and HTML and there is nothing different, that I noticed, from the project files.

What could be causing this or what steps can I take to force the carousel to be a set height no matter which slide is being viewed?

4 Answers

Thanks, I also figured out that the discrepancy from my page and the video is due to different text on the slide. The video is one line of text less than the project file for some reason.

Ah right ok, I have noticed a couple of times the project files have been slightly differnt to whats on the video, keep seeing content that isnt in the project file and is on the video.

Yes so have I, its frustrating at times but it's definitely improving my troubleshooting skills!

James Barnett
James Barnett
39,199 Points

> The video is one line of text less than the project file for some reason.

Tagging Guil Hernandez on this one

I had the same thing, but when you download the next project files its fine, you could always make a new class making a height: XXpx; so all the slides would have the same height. but not sure how that would effect the media querys you would have to set it for each break point.

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Looking into it now. Thanks everyone – I apologize for the missing content. :)

Is there a way to keep the carousel a static height with a Bootstrap class or do you need to make a custom class for it?

Guil Hernandez
Guil Hernandez
Treehouse Teacher

Steven Wade,

The height is variable, so you'll need to adjust it with custom CSS.