Materialize: [Carousel] If you put an image into a carousel-item, the whole carousel's height gets resized to the height of the image.

Created on 22 Feb 2017  路  7Comments  路  Source: Dogfalo/materialize

Description

When you add an to the carousel-item it resizes the carousel's height to the image's height. If you edit the image's height it edits the carousel's. I found it impossible to set the height of the carousel, or the carousel-item with css.

Repro Steps

Insert an image into a carousel item.

Or check this Codepen

Screenshots

image
image

bug

Most helpful comment

same issue. I'm trying to place multiple images inside a single carousel-item and the whole carousel keeps resizing

All 7 comments

Would you prefer if you could override the height of the carousel with a plugin option?

Closed due inactivity. Feel free to reopen it, if it's still necessary.

same issue. I'm trying to place multiple images inside a single carousel-item and the whole carousel keeps resizing

Someone found the solution?

just give the carousel a fixed height with !important, seems like the easiest solution

Tks @lastnoob ! I will try it

I am putting images of pages in the carousel and want to view them on maximum size for the screen/device so setting a hard height does not work for me. What would be ideal is to have a "fullSize" option that resizes the carousel to fit the image, making it as large as possible given the constraints of the screen, but does not crop.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

heshamelmasry77 picture heshamelmasry77  路  3Comments

locomain picture locomain  路  3Comments

onigetoc picture onigetoc  路  3Comments

cope picture cope  路  3Comments

hartwork picture hartwork  路  3Comments