Topic: how to change carousel-thumb's to support mutiple-row .carousel-indicator?

rocwen free asked 5 years ago


I have 18 images in carousel-indicator, they are all in the same line, that makes the width too large, can I change it to multiple row?

rocwen free answered 5 years ago


Thank you, it works!

xardonik free answered 5 years ago


Ehh, I don't have your images, nevermind I tried with example by mdb. You need add to:
.carousel-thumbnails .carousel-indicators {
    flex-wrap: wrap;
    justify-content: center; //optional but thumbnails looks nice with that.
    padding: 0 15px; //optional
    width: 100%; //optional
    position: static; //optional
    right: 0; //optional
    bottom: 0; //optional
    margin-right: 0; //optional
    margin-left: 0; //optional
}

.carousel .carousel-indicators li {
    margin-top: 3px;
    margin-bottom: 3px;
} 
if you use position:static move .carousel-control-prev and .carousel-control-next inside .carousel-inner I hope you enjoy this solution ;) PS: change number of items in row to 9 is hard in my opinion.

rocwen free answered 5 years ago


you can see I have 18 "li" elements, it is too long in one row/line, how to make them wrap back automatically or 9 elements per row ?

rocwen free answered 5 years ago


    <div class="row" id="selectphoto">
        <div class="col-md-12 ">
            <!--Carousel Wrapper-->
            <div id="carousel-thumb" class="carousel slide carousel-fade carousel-thumbnails" data-ride="carousel">

                <!--Slides-->
                <div class="carousel-inner text-center" role="listbox">
                    <div class="carousel-item active"><img  src="img/postcardphotos/big/no9-summer-night-at-riddarholmen.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no18-drottningholm_palace.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no17-drottningholm_park.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no16-stockholm_full_view.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no8-stockholm-views.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no7-stockholm-cathedral-lucia-celebration.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no6-skeppsbron-in-the-evening.jpg">   </div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no5-skating-in-the-archipelago.jpg">     </div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no4-skating-in-stockholm.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no3-gyllene-salen-the-city-hall.com.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no2-guards-at-the-royal-palace.jpg">         </div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no15-stockholm_old_town.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no14-stockholm_full_view.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no13-stockholm_city_hall.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no12-vasa_museum.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no11-royal_palace.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no10-stockholm_city_hall.jpg"></div>
                    <div class="carousel-item "><img src="img/postcardphotos/big/no1-boatlife-in-stockholm.jpg"></div>
                </div>
                <!--/.Slides
                                <!--/.Controls-->
                <ol class="carousel-indicators">
                    <div class="container-fluid">
                        <div class="row">
                            <div class="col-md-12">
                                <li data-target="#carousel-thumb" data-slide-to="0" class="active"><img
                                        src="img/postcardphotos/small/no9-summer-night-at-riddarholmen-small.jpg"
                                        class="img-fluid">
                                </li>
                                <li data-target="#carousel-thumb" data-slide-to="1"><img
                                        src="img/postcardphotos/small/no18-drottningholm_palace-small.jpg"
                                        class="img-fluid"></li>
                                <li data-target="#carousel-thumb" data-slide-to="2"><img
                                        src="img/postcardphotos/small/no17-drottningholm_park-small.jpg" class="img-fluid">
                                </li>
                                <li data-target="#carousel-thumb" data-slide-to="3"><img
                                        src="img/postcardphotos/small/no16-stockholm_full_view-small.jpg" class="img-fluid">
                                </li>
                                <li data-target="#carousel-thumb" data-slide-to="4"><img
                                        src="img/postcardphotos/small/no8-stockholm-views-small.jpg" class="img-fluid"></li>
                                <li data-target="#carousel-thumb" data-slide-to="5"><img
                                        src="img/postcardphotos/small/no7-stockholm-cathedral-lucia-celebration-small.jpg"
                                        class="img-fluid"></li>
                                <li data-target="#carousel-thumb" data-slide-to="6"><img
                                        src="img/postcardphotos/small/no6-skeppsbron-in-the-evening-small.jpg"
                                        class="img-fluid">
                                </li>
                                <li data-target="#carousel-thumb" data-slide-to="7"><img
                                        src="img/postcardphotos/small/no5-skating-in-the-archipelago-small.jpg"
                                        class="img-fluid">
                                </li>
                                <li data-target="#carousel-thumb" data-slide-to="8"><img
                                        src="img/postcardphotos/small/no4-skating-in-stockholm-small.jpg" class="img-fluid">
                                </li>
                                <li data-target="#carousel-thumb" data-slide-to="9"><img
                                        src="img/postcardphotos/small/no3-gyllene-salen-the-city-hall.com-small.jpg"
                                        class="img-fluid"></li>
                                <li data-target="#carousel-thumb" data-slide-to="10"><img
                                        src="img/postcardphotos/small/no2-guards-at-the-royal-palace-small.jpg"
                                        class="img-fluid">
                                </li>
                                <li data-target="#carousel-thumb" data-slide-to="11"><img
                                        src="img/postcardphotos/small/no15-stockholm_old_town-small.jpg" class="img-fluid">
                                </li>
                                <li data-target="#carousel-thumb" data-slide-to="12"><img
                                        src="img/postcardphotos/small/no14-stockholm_full_view-small.jpg" class="img-fluid">
                                </li>
                                <li data-target="#carousel-thumb" data-slide-to="13"><img
                                        src="img/postcardphotos/small/no13-stockholm_city_hall-small.jpg" class="img-fluid">
                                </li>
                                <li data-target="#carousel-thumb" data-slide-to="14"><img
                                        src="img/postcardphotos/small/no12-vasa_museum-small.jpg" class="img-fluid"></li>
                                <li data-target="#carousel-thumb" data-slide-to="15"><img
                                        src="img/postcardphotos/small/no11-royal_palace-small.jpg" class="img-fluid"></li>
                                <li data-target="#carousel-thumb" data-slide-to="16"><img
                                        src="img/postcardphotos/small/no10-stockholm_city_hall-small.jpg" class="img-fluid">
                                </li>
                                <li data-target="#carousel-thumb" data-slide-to="17"><img src="img/postcardphotos/small/no1-boatlife-in-stockholm-small.jpg" class="img-fluid"></li>
                            </div>
                        </div>
                    </div>
                </ol>
                <!--Controls-->
                <a class="carousel-control-prev" href="#carousel-thumb" role="button" data-slide="prev">
                    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                    <span class="sr-only">Previous</span>
                </a>
                <a class="carousel-control-next" href="#carousel-thumb" role="button" data-slide="next">
                    <span class="carousel-control-next-icon" aria-hidden="true"></span>
                    <span class="sr-only">Next</span>
                </a>
            </div>
            <!--/.Carousel Wrapper-->
        </div>
        <!--/.Content-->
    </div>

xardonik free answered 5 years ago


Can you give link to your code? It's really easier work with real code and immediately check code and modification

rocwen free answered 5 years ago


version info MDBPro 4.3

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags