Tips for resolving issues with a bootstrap carousel containing several images

I have a carousel here that I'm trying to create with multiple images, similar to a Netflix carousel.

 <div class="container">
      <div class="row">
          <div class="col-sm-12">
        <div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators d-none">
          <li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
          <li data-target="#carouselExampleCaptions" data-slide-to="1"></li>
          <li data-target="#carouselExampleCaptions" data-slide-to="2"></li>
        </ol>

        <div class="carousel-inner">
          <div class="carousel-item active">
              <div class="row">
                  <div class="col-xs-4">

                   <img src="img/10.jpg" class="img-item" alt="...">


            </div>
            <div class="col-xs-4">

                <img src="img/11.jpg" class="img-item" alt="...">


         </div>
         <div class="col-xs-4">

            <img src="img/12.jpg" class="img-item" alt="...">


          </div>

         </div>
        </div>
    </div>
        <a class="carousel-control-prev" href="#carouselExampleCaptions" 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="#carouselExampleCaptions" role="button" data-slide="next">
          <span class="carousel-control-next-icon" aria-hidden="true"></span>
          <span class="sr-only">Next</span>
        </a>

    </div>
</div>
</div>
</div>

I placed the images within columns and wrapped them in one row. Despite the images displaying correctly, the slider is not functioning as expected!

Answer №1

Did you remember to include the Bootstrap JS in the head of your document?

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>

Assuming you've done that, everything should be working fine. If not, take a look at this example and compare it to your code: Carousel Example

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Dynamically linking tabbable tabs is a useful technique that allows for

I have been working on an app that organizes websites into groups displayed as tabs in a tabbable navigator using Twitter Bootstrap. The idea is that each time a new group is added, a new tab should appear. Currently, this is how it looks: The functionali ...

Do not show empty pages in Mpdf display

I utilized Mpdf to generate a three-page PDF document. The first and third pages consistently contain data, but the presence of data on the second page varies. I prefer not to display the second page if it is empty. Here's the code structure: html = ...

Issue with implementing a custom-sized video embed in Bootstrap where the max-height is not

I've inserted a tall video into this bootstrap carousel. The video on the second slide is not a standard bootstrap size - it's 4x5. To address this, I used custom code: class="vidbox embed-responsive embed-responsive-4by5" /* Cust ...

Boosting your website with a slick Bootstrap 4 responsive menu that easily accommodates additional

I have incorporated a main menu in my website using the Bootstrap 4 navbar. However, I also have an additional div (.social-navbar) containing some extra menu items that I want to RELOCATE and INSERT into the Bootstrap menu only on mobile devices. Essentia ...

Creating a well-aligned form using Material-UI

Exploring Material-UI for the first time! How can a form be built where certain fields are arranged horizontally, others stacked vertically, and all aligned perfectly both vertically and horizontally? Check out this example image: https://i.sstatic.net/5R ...

The HTML checkbox remains unchanged even after the form is submitted

On a button click, I have a form that shows and hides when the close button is clicked. Inside the form, there is an HTML checkbox. When I check the checkbox, then close the form and reopen it by clicking the button again, the checkbox remains checked, whi ...

Sort slider items using Show/Hide feature in bxSlider

I am using a bxslider on my website with specific settings: $('#carousel').bxSlider({ slideWidth: 146, minSlides: 2, maxSlides: 6, speed:500, adaptiveHeight: true, moveSlides:3, infiniteLoop : false, hideContr ...

Avoid having individual words centered on a single line of text

Currently, I'm in the process of developing a website using WooCommerce, WordPress, and Elementor. I've encountered an issue where only one word appears on each line and have tried various solutions such as hyphens, word-break, and line-break wit ...

Maintaining the format of forms input in Rails and HTML: Tips and tricks

Hey there! I'm working on a Rails app that has a simple HTML form. One of the fields is called description, which is a text_area. I want to be able to display its input exactly as it was entered on the index page. For instance: If someone enters a l ...

HTML5 and CSS Menu: Displaying and concealing items based on screen size

When the screen size is 320px, I want to hide the menu. Currently, the menu is always hidden and I need to call it. It should be visible by default, but when the screen size is 320px, #main-nav needs to be called. * { box-sizing: border-box; } ...

Tips for temporarily storing data while redirecting during 2 OAuth Steps

After researching and reviewing various sources, I am still struggling to understand the concept. The issue seems to be related to numerous redirects occurring within my application. Let's take a closer look at the steps involved: Step 1: Log in wit ...

Implement a horizontal scrollbar using jQuery

My div contains a horizontal scroll, but its width is smaller than the content inside. This layout was achieved using CSS div { width: 300px; overflow: auto; } div p { width: 600px; } Here is the HTML code: <div> <p> This paragra ...

The div's height is failing to adjust based on the content it contains

My div with the class .list-holder in the header is not adjusting its size based on the content within the div. When I increase the padding of the list items, the content overflows outside the div. I have included the Bootstrap CDN. .list-holder { ...

Displaying content generated by Html.Raw in MVC4 using JavaScript and AJAX is causing displacement of content within the <a> tags in the HTML

My project includes a feature where emails sent to a specific address are parsed, with attachments saved to the network and metadata stored in a database. If the serial number of a finished good matches the one included in the email, a note is generated an ...

How to Use Absolute Positioning in Bootstrap 3.0 to Position Child Divs

I have a div block that needs to always be displayed at the bottom of the section, regardless of whether the section above is empty. The inner div should stay at the bottom of the section, as shown in the attached image. https://i.sstatic.net/cor6k.jpg T ...

Should I use Sqlite or Mysql for this project?

I'm in the process of developing an internet-based operating system and I am planning to utilize a database along with persistence.js to store installed apps. Can anyone recommend the optimal database for this purpose? ...

What is the best way to add border-radius to an image while incorporating padding?

I am facing an issue with images that have white padding at the top and bottom. Please refer to the attached image. Whenever I try to apply the border-radius property to these images, the edges appear distorted. Is there a way to resolve this problem wit ...

Reduce the text of the link

Trying to simplify a task, but I'm struggling with the solution. What I want to achieve is shortening a link to 30 characters and adding ... at the end if it's longer. Also, I'd like to make it possible to see the full link on hover similar ...

creating URLs using javascript

I am seeking guidance on how to dynamically generate URLs for different languages using JavaScript. When the server sends JSON data to the frontend, I have a header file and a helper function that helps in creating URLs in JavaScript. I am trying to figu ...

What strategies can I use to keep text-area from wrapping onto a new line?

I'm having trouble with styling my description column <template v-slot:item.description="{ item }" class="description" style="overflow-wrap: normal"> {{ item.description }} </template> CSS <style scoped> ...