The Bootstrap carousel and column are having trouble sticking together side by side

Objective: My goal is to design a bootstrap layout featuring a carousel on the left and text blocks on the right. These sections are denoted as "Left Column" and "Right Column" respectively in the HTML comments.

Challenge: I am facing difficulty in maintaining the carousel and text in distinct columns. Instead, they are stacking vertically, with the carousel appearing above and the text below it.

Situation: I have experimented with different approaches such as rearranging div elements and creating new ones. I have attempted removing flex CSS styling and adjusting margins and padding without success. Despite reviewing similar issues on Stack Overflow, none of the solutions seem applicable to my specific problem.

It appears that there is no conflicting CSS affecting this layout issue since other columns and rows on the same page function correctly. Nevertheless, including a screenshot here for reference.

HTML Code

<div class="container">
         <div class="row">

            <!-- Left Column Start -->
            <div class="col-6" id="carousel-contain">
                <div id="plantCarousel" class="carousel slide col-6" data-ride="carousel" data-interval="false">
                    <ol class="carousel-indicators">
                        {% for image in plant.plant_images.all %}
                            {% if forloop.first %}
                                <li data-target="#plantCarousel" data-slide-to="{{forloop.counter0}}" class="active"></li>
                            {% else %}
                                <li data-target="#plantCarousel" data-slide-to="{{forloop.counter0}}"></li>
                            {% endif %}
                        {% endfor %}
                      <li data-target="#plantCarousel"></li>
                    </ol>
                    <div class="carousel-inner">
                        {% for image in plant.plant_images.all %}
                            {% if forloop.first %}
                        <div class="carousel-item active">
                            {% else %}
                            <div class="carousel-item">
                            {% endif %}
                                <img src="{{ image.images.url }}" alt="{{ plant.name }}">
                            </div>
                        {% endfor %}
                        </div>
                
                        <a class="carousel-control-prev" href="#plantCarousel" 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="#plantCarousel" 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>
            <!-- Left Column Ends -->

            <!-- Right Column Start -->
            <div class="col-6">
                <p> <b>Latin Name: </b>{{ plant.latin_name }} </p>
                <br>
                <p><b>Description: </b></p>
                <p> {{ plant.description }} </p>
                <br>
                <br>
            </div>
            <!-- Right Column Ends --> 
    
        </div>
    </div>

CSS Styles

/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 60px; /* Margin bottom by footer height */
}

.container {
  max-width: 960px;
}

.pricing-header {
  max-width: 700px;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 60px; /* Set the fixed height of the footer here */
  line-height: 60px; /* Vertically center the text there */
  background-color: #f5f5f5;
}

img {
  max-width: 100%;
  max-height: 100%;
}

Preview of the Layout: https://i.sstatic.net/HbwWv.jpg

Answer №1

Upon further investigation, I realized that my mistake was including an additional </div>. This prematurely ended the row and prevented the right column from being added correctly.

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

Can a full-screen background be added to a blank webpage?

Is there a way to create a full-window background on a webpage that doesn't rely on viewport units? The current page may not be empty, but all the elements are absolutely positioned. The background stopped functioning properly when tested against bro ...

Obtaining the image URL from HTML textWould you like to know

Can you provide guidance on retrieving an image URL or loading an image from the HTML text displayed below in Android development? The following code snippet extracts the image URL from a specific piece of HTML content: <p style="text-align: justify; ...

Delete one object and then sequentially rename all remaining objects

object This is the object I retrieved. How can I remove module_1 object and rename the module object? For example, remove module_1 and rename module_2, module_3... to module_1, module_2... `{ "module_1": { "modulename": "mat ...

The CSS code for creating a typing effect is not functioning properly

I'm having some trouble with a code snippet I wrote to create a typing effect on hover within a div. Here's the code: .about-panel:hover p { color: white; font-size: 1em; white-space: wrap; overflow: hidden; -webkit-animat ...

Ways to conceal a form post-submission

Looking for help with a programming issue - I'm trying to hide a form after submitting form data to prevent multiple submissions. The forms are created dynamically and I've tried hiding both the form and the div it's inside without success. ...

Personalizing the app's listview items by customizing the ui-icon arrow

Is there a way to customize the arrow image used for list items in a jQuery Mobile listview? How can I replace the default grey circle arrow with my own image? Do I need to override jQuery CSS classes for this task? My current setup uses jQuery Mobile 1.1. ...

Leveraging webpack for CSS bundling

I'm currently working on bundling some NPM modules using webpack instead of utilizing a CDN. While I've successfully managed to integrate the .js files, I'm facing challenges with including the .css files for these modules. One example is ...

Troubleshooting problem with CSS background image

I'm looking to make my webpage more dynamic and interactive. One issue I have is that the background image of the body element stretches when new elements are added, which is not the desired behavior. Any suggestions on how I can fix this? <styl ...

Why is the media query not affecting this image?

<div class="col-lg-6" > <img src = "iphone6.png" id="dog-mobile" alt="phone"> </div> #dog-mobile{ height:600px; position: absolute; right: 25%; transform: rotate(25deg); } ...

What is the Best Way to Toggle the Visibility of Specific Buttons in a Table Using Jquery?

<html> <head> <script> $( "#clickMeButton" ).click(function() { $(this).next("#hiddenButton").slideToggle( "slow", function() { // Animation complete. }); }); </script> </head> <body> <table> <tr& ...

An online enrollment tool that utilizes a combination of HTML and Microsoft Excel/Access

My friend needs a registration software created for his blood donation camp. He mentioned that he is unable to host an ASP.NET or PHP page. Additionally, since the software will be used on multiple non-interconnected systems, they might not have access to ...

The ellipsis menu pops up next to the final video in the series of HTML videos

Currently, I am working on rendering HTML video tags for playing videos. However, I am facing an issue where the three dots menu is not appearing near the button that triggered it, instead, it displays near the last video's three dots. To illustrate t ...

How come WhatsApp is not recognizing my og:tags correctly?

I'm having an issue with my webpage where the og:tags generated for link previews on Facebook work fine, but they can't seem to be scraped by WhatsApp. Even though the tags are correct in the source code of the site, WhatsApp shows an error messa ...

If the AJAX call is successful, proceed with the desired action

Currently, I am utilizing an AJAX call to retrieve data from a PHP file in JSON format. My goal is to change the color of my element based on whether a certain part of the data is true. I attempted to implement it as suggested here (async:false): Submit f ...

Incorporate various components within a loop onto a canvas

I am working with multiple canvas elements: <canvas class="screen" width="250" height="250" data-json="{{json_encode($board)}}"></canvas> Within my JavaScript code, I encounter the following issue: var canvas = document.getElementsByClassNa ...

Click on the lines to highlight them with your mouse or use the arrow keys

Previously, I inquired about how to Highlight lines of text on mouseover. However, after using it for some time, I discovered a few drawbacks. One issue was that users would often lose track of their place when switching tabs or moving the mouse to perform ...

How can we stop Vuetify from overwriting Bootstrap3's classes when using treeshaking?

I am currently in the process of transitioning an app from jQuery/Bootstrap3 to Vue/Vuetify. My approach is to tackle one small task at a time, such as converting the Navbar into its own Vue component and then gradually updating other widgets. Since the n ...

Efficient Django Template: Accurate Conversion of Values through Dictionary Searching

I have an object with an attribute that has specific choices defined in its class: class StashURLJobRequest(models.Model): STATUS_CHOICES = ((0,"Requested"),(1,"Done"),(2,"Failed")) url = models.URLField() created = models.DateTimeField(auto_n ...

Issues with the input element: Transition, border-color, and :focus functionalities are not functioning as

Currently, I am in the process of developing a search box similar to Google's for an e-commerce platform. Unfortunately, I am facing difficulties with the border-color, transition, and :focus properties. To further elaborate on the issues: border-col ...

Ways to improve the transition of a <video> background using CSS

My webpage features a unique 10-second video wallpaper achieved using only pure CSS. Below is the code I used: <style> video#bgvid { position: fixed; right: 0; bottom: 0; min-width: 100%; min-height: 100%; width: auto; he ...