Bootstrap: Carousel height resizes when slide images have different sizes/ratios

Created on 13 Dec 2015  路  6Comments  路  Source: twbs/bootstrap

All 6 comments

One potential difficulty I foresee is dealing with slides which are dynamically added/removed from the Carousel's DOM.

I am attempting to normalize the height of some carousels using the methods described by coderwall and stack overflow mentioned above, but I have had no success. Mostly because I probably don't know enough about jquery.

https://github.com/h20ld3n/holdenhardcastle.com.git~~

I am attempting to get this to work on the index.php. The problem child starts on line 261

@h20ld3n Please use StackOverflow, IRC, Slack, or similar for personal support questions, rather than this issue tracker. See https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker

I think the solution to this is advising folks in the docs to ensure content is the same height in their implementation. That means same-sized images, setting dimensions on the slides themselves, etc.

For your information it's the same behavior in V3

mdo's answer is technically correct and supports cvrebert's foresight suggesting that dynamically generated elements are not supported for the Carousel feature. No further information has been provided to indicate the contrary. The issue persists in Bootstrap v3.3.7 as of this writing, July 2018.

Was this page helpful?
0 / 5 - 0 ratings