Bootstrap carousel width and height

前端 未结 8 1532
不思量自难忘°
不思量自难忘° 2020-12-12 20:55

Im trying to do a bootstrap carousel with full width for the images (width: 100%) and a fixed height but if I set the width to 100% the height automacally is taking the 100%

8条回答
  •  遥遥无期
    2020-12-12 21:24

    I know this is an older post but Bootstrap is still alive and kicking!

    Slightly different to @Eduardo's post, I had to modify:

    #myCarousel.carousel.slide {
        width: 100%; 
        max-width: 400px; !important
    }
    

    When I only modified .carousel-inner {}, the actual image was fixed size but the left/right controls were displaying incorrectly off to the side of the div.

提交回复
热议问题