Positioning Images in Bootstrap 4

I'm encountering an issue with Bootstrap 4. The left box isn't aligning properly with the right box. This involves both HTML and CSS. How can I go about resolving this issue?

<section>
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <h1 class="text-center">Section Title</h1>
        </div>
        <div class="col-md-6">
            <div class="left-box">
                <img src="images/category-1.jpg" alt="" class="img-fluid">
            </div>
            <div class="left-box">
                <img src="images/category-2.jpg" alt="" class="img-fluid">
            </div>
        </div>
        <div class="col-md-6">
            <div class="right-box">
                <img src="images/category-3.jpg" alt="" class="img-fluid">
            </div>
        </div>
    </div>
</div>

CSS:

.left-box{ position:relative; padding-top:30px;}
.right-box{position:relative; padding-top:30px;}

1

Appreciate any help in advance.

Answer №1

Bootstrap offers two types of Containers, and for your situation, using container-fluid would be more suitable. Switch from container to container-fluid

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

How can I ensure that my style.scss file effectively interacts with my stylesheet by including imports for "variables", "globals", and "header"?

Currently, I am in the process of learning how to utilize Sass and JavaScript through VS Code. Within my project structure, I have an "app" folder where my js folder resides containing script.js, as well as a scss folder holding _globals.scss, _header.scss ...

Hide all elements in jQuery that do not have a class assigned

I've implemented a straightforward jQuery script that toggles the "active" class on an li element when it is clicked: $('li').click(function() { $(this).toggleClass('active'); }); My goal is to hide all other li elements in t ...

"Customize your WordPress theme by moving the sidebar from left to right for

Currently, I am utilizing the flat theme sourced from . In an attempt to customize the appearance, I made modifications within style.css: #page:before, .sidebar-offcanvas, #secondary {float: right !important;} However, this adjustment only applies to a ...

What is the best way to retrieve the background color of specific table cells?

I have a table that showcases various pieces of information. One interesting feature I added is a notes column, which includes a tooltip created using CSS and jQuery. However, there seems to be an issue with the tooltip's behavior - when I hover over ...

Styling Multiple Fullscreen Rows with Bootstrap CSS

Does anyone have any suggestions for the CSS code needed to stack five rows on top of each other? Each row should be 100% height and width of the browser. Here is the HTML code I currently have: <div id="wrapper"> <div class="container-fluid"> ...

Generate a visually dynamic representation of a live website page

I'm curious if it's possible to create a login page similar to the one shown in this image, using HTML, CSS, and Javascript. Instead of a traditional background image, I want the background to display the actual layout of another website, such a ...

A guide on creating a downward animation of an object using CSS3

I am currently working on practicing CSS 3 animation. I am facing a challenge in figuring out how to make the item fall down the page at full speed without needing the user to track it downward with the mouse, all without using javascript. Ideally, I want ...

The issue of overflowing scroll functionality appears to be malfunctioning

.main-content{ height: 100%; width: 60%; min-height: 800px; background-color: white; border-radius: 5px; margin-left: 1%; border: solid 1px black; } .profile-banner{ display: flex; flex-direction: row; justify-content: space-between; ...

Instructions for sending an email through a form while displaying a pop-up message

My Objective To create a functionality on my website where users can input their email addresses in a form and receive a validation popup indicating whether the email is valid or not. Background Information I am currently working on a website that allow ...

Visualization with D3 - Putting an image at the heart of a circular chart made with SVG

Is it possible to add an image to the center of a donut SVG in D3 charts using JavaScript? I've been attempting to achieve this but haven't had any success so far. Currently, I have inserted the image in HTML, but it does not align with the cent ...

Attempting to include a navigation bar within the footer section of my layout page - the master page on my website

Is there a way to add a navigation bar in my footer on the layout page without having to add it to every individual page? I want the icon color for the active page to be red, but only apply this to the current page and not all pages. Currently, when I nav ...

Execute function prior to redirection of iframe

I have a specific challenge with an iframe on my webpage. I am looking to trigger a function right before the iframe reloads a new page, rather than after it has finished loading. I need this function to be triggered before the iframe redirects to the new ...

Achieving right-aligned buttons in Bootstrap

Is there a way to align a button to the left inside a div that has the class justify-content-center applied? Here is the code I tried: <div class="card-header justify-content-center"> <div> <div class="ml-5"> Text i ...

Is there a way to access the body html element within a template in vue.js?

I'm struggling to add styles to the body element of my HTML page. It seems like I can't access it directly from the template because there's another body element nested inside the main body. Even when I try to change the style using JavaScri ...

Recreate body content with JQuery Mobile

I've been attempting to duplicate the entire HTML content within the tags. However, even though the appearance on screen is correct, none of the links are functioning.</p> <p>To view the fiddle, click here: [Here is a fiddle][1]</p> ...

Execute a JavaScript function when a form is submitted

Seeking to reacquaint myself with Javascript, encountering difficulties with this fundamental issue. https://jsfiddle.net/gfitzpatrick2/aw27toyv/3/ var name = document.getElementById("name"); function validate() { alert("Your name is " +name); } < ...

What prevents Django websites from being embedded within another HTML (iframe)?

I attempted to include a Django form within another HTML page, but it's not functioning correctly. I've tried on several of my other Django sites with no success. I even tested it on other websites as well. Is there a restriction on using Django ...

What is the best way to incorporate navigation options alongside a centered logo?

Looking to create a unique top header layout with the logo positioned in the center and navigation options on both sides. Below is the initial code, but unsure how to proceed further. Any suggestions on achieving this design? <div class="header"> ...

Exploring Django's view field for efficient data rendering

Is it possible to display multiple views for a single page/template? For instance, imagine a website where users can submit movie reviews and read others' reviews as well. Now, I need to add an edit button to the review pages but only want the button ...

Container items in flexbox that surpass the defined width

Hello, I am facing an issue where my container is exceeding the maximum allowed width of my flex container (with justify space-between). Essentially, I have divided my 3 children into equal parts of 33.33%, but the total width exceeds the limit: Image: ...