Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to increase the size of carousel in materialize.css?

I am trying to increase the size of carousel in materialize.css but couldn't get it. I have tried setting height but it didn't work. I googled it but couldn't find any solutions. Could anyone help me with this?

like image 595
Boopesh Avatar asked Jun 11 '16 09:06

Boopesh


4 Answers

.carousel .carousel-item {
width:300px !important;}

this might help, place this code in your css and change width acording to your need.

like image 82
Nitin Varun Avatar answered Sep 16 '22 14:09

Nitin Varun


Set a minimum height that correlates to the actual height of the images you want to include. For me, that was 900px.

.carousel { 
min-height: 900px;
}
like image 26
Steven Velazquez Avatar answered Sep 20 '22 14:09

Steven Velazquez


after long trying, I figured out a solution that works for me:

.carousel .carousel-item>img {
    width: 230%; //there you set the width
    margin-left: -70%; //this is the centering of carousel (in original, it is a bit off to the right)
}

Hope it helps!

like image 22
Fanda Soudek Avatar answered Sep 16 '22 14:09

Fanda Soudek


My carousel images were too big for the standard container. This is what I used, and my images are displaying perfectly now.

.carousel {
    height: 600px;
}
like image 26
Chris Fremgen Avatar answered Sep 20 '22 14:09

Chris Fremgen