The div father's width is not fully occupied by col-xl-12

Can you explain why inew2 and inew3 do not have a width of 100% of their parent div? https://i.sstatic.net/a4GEa.jpg

html, body{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
.ibrands{
height: 120px;
background-color: blue;
}

@media only screen and (min-width: 992px) {

.navbar {
height: 80px;
}
.inew1{
height: 720px;
background: red;

}
.inew2{
height: 360px;
background: yellow;
width: 100%;
}
.inew3{
height: 360px;
}
.ibrands a{
margin-left: 20px;
margin-right: 20px; 
}
}
 <div class="container-fluid"> 
      <div class="row">
          <div class="col-xl-8 col-lg-12 inew1 d-flex justify-content-end align-items-start flex-column">
              <h1 class="">Title</h1>
              <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laudantium veritatis repudiandae unde, placeat iste eaque omnis necessitatibus, ratione, distinctio laboriosam rem, at porro aut saepe quia. Voluptas dicta alias, molestiae!</p>
          </div>
        <div class="col-xl-4 col-lg-12">
            <div class="col-xl-12 inew2 d-flex justify-content-end align-items-start flex-column">
                            <h1 class="">Title2</h1>
                            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi dolores accusantium, eius inventore nemo molestiae dolore ex voluptates et aut incidunt eligendi vel asperiores maxime soluta tenetur id exercitationem magnam!</p>
            </div>
            <div class="col-xl-12 inew3 d-flex justify-content-end align-items-start flex-column">
                            <h1 class="">Title3</h1>
                            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi dolores accusantium, eius inventore nemo molestiae dolore ex voluptates et aut incidunt eligendi vel asperiores maxime soluta tenetur id exercitationem magnam!</p>
            </div>
        </div>
      </div;

      <div class="row ibrands">
            <div class="col-12 d-flex justify-content-center align-items-center ">
            <a href="" class="">a</a>
            <a href="" class="">b</a>
            <a href="" class="">c</a>
            </div>
      </div>
    </div>

Answer №1

It is recommended to include a .row when nesting columns to eliminate any extra margin on the sides.

<div class="col-xl-4 col-lg-12">
   <div class="row">
        <div class="col-xl-12 inew2 d-flex justify-content-end align-items-start flex-column">
                        <h1 class="">Títle2</h1>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi dolores accusantium, eius inventore nemo molestiae dolore ex voluptates et aut incidunt eligendi vel asperiores maxime soluta tenetur id exercitationem magnam!</p>
        </div>
        <div class="col-xl-12 inew3 d-flex justify-content-end align-items-start flex-column">
                        <h1 class="">Títle3</h1>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi dolores accusantium, eius inventore nemo molestiae dolore ex voluptates et aut incidunt eligendi vel asperiores maxime soluta tenetur id exercitationem magnam!</p>
        </div>
    </div>
</div>

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

I am interested in displaying a tooltip when a button is hovered over

In my application, there is a button with the ID #download_setup. Currently, an AJAX call is triggered upon clicking this button. However, there are certain users for whom I need to prevent this AJAX download and instead display a tooltip saying "you don&a ...

What is the best way to set the width of an element to 100% while accounting for padding

My dilemma involves an HTML input field. The input currently has padding: 5px 10px;, but I need it to occupy 100% of its parent div's width (which is fluid). If I try using width: 100%;, the input ends up being wider than intended due to the padding ...

Is there still a need to preload dynamic images in the background?

Imagine you have HTML code that includes an image with a placeholder: <img class="lazy-load" src="http://via.placeholder.com/150/?text=placeholder" data-src="http://via.placeholder.com/150/?text=real%20image"/> At some stage, you want to implem ...

Please click the provided link to display the data in the div. Unfortunately, the link disappearance feature is currently not

What I'm Looking For I want the data to be displayed when a user clicks on a link. The link should disappear after it's clicked. Code Attempt <a href="javascript:void(0);" class="viewdetail more" style="color:#8989D3!important;">vi ...

I prefer showcasing the contents at the top of the page instead of the bottom

Is there a way to show the message for the $myGame variable after submitting a post? <!DOCTYPE HTML> <html> <head> </head> <body> <?php $myGame = ""; if ($_SERVER["REQUEST_METHOD"] ...

How do I navigate to the homepage in React?

I am facing an issue with my routes. When I try to access a specific URL like http://localhost:3000/examp1, I want to redirect back to the HomePage. However, whenever I type in something like http://localhost:3000/***, I reach the page but nothing is dis ...

Ensure that a div element expands to 100% of its parent's height when its child's height is less than 100%

I am struggling with a flex div that contains 2 elements. I want both elements to take up the full parent height while their content remains at auto height, but I keep getting the inner content height. Here is my code: <html lang="en"> <head&g ...

I'm having trouble figuring out how to perfectly center this div on all types of devices

As someone who is new to css, I have been struggling to center these divs in the middle of the page across all devices despite searching extensively online and trying various solutions without any success. Check out my code below: Snippet: :after, :be ...

Is the absolute positioned element on the left or right based on its current location?

Is there a way to assign absolute positioning with left at 0px or right at 0px depending on whether the positioned div will go outside of its container? For example, when you right click in a browser and see the menu appear to the right of where you click ...

Send information using AJAX within a .NET integrated browser

In our current setup, we utilize a .NET embedded browser to showcase an HTML page that is generated by applying an XSLT file to an XML file using .NET. This process results in HTML content displayed within the embedded browser through the DocumentText prop ...

Template file for the contact form 7 plugin in Wordpress

I'm currently utilizing the Contact Form 7 plugin on my Wordpress website and I'm curious about which template it directs to when I enter mysite.com/contact/ into the browser. I am interested in making some edits to the template file, but I am un ...

Bootstrap 3 Full-Width Responsive Image Overlapping

I have designed a grid layout with col-md-7 on the left side and col-md-5 on the right side. The images in the col-md-5 are responsive and have a full-width of col-md-12. <div class="container"> <div class="row"> <div class="col ...

The HTML table printout is missing cells in the first column

Encountered a strange issue with Internet Explorer and Chrome involving a basic HTML table. The table has no layout CSS, 2 columns, no styles, and its width is set to 100%. When attempting to print the table in these browsers, the first cell on the second ...

The HTML Bootstrap collapse feature is not functioning correctly upon the initial button press

Could you assist me with implementing a bootstrap and javascript collapse feature? I have two collapsible cards. The first card should be visible initially, but then switch to the second card when clicked on a link. However, upon the first click, both card ...

"Experiencing a callstack overflow due to multiple carousels on one page using Jquery or Vanilla

Currently, I am working on implementing a Jquery infinite autoplay multiple carousel. What I have done is created two separate carousel blocks on the same page within the body section. <div class="rotating_block"> <div class="bl ...

Ways to ensure a form label is accessible via keyboard navigation

My HTML5 form collects user information and processes it upon submission. With the help of the jQuery Validation Plugin, input validation is performed. In case of errors, an error-message-container div is displayed at the top of the screen, listing all err ...

Mastering the art of column stacking with CSS on your WordPress website

Looking for a CSS solution to adjust the layout when the screen resolution is lowered. Currently, I have two rows with three columns in each row, containing blurbs. My goal is to make these two rows convert into three rows with two columns each at a cert ...

An issue arises in vue.js where the v class binding takes precedence over other bindings and fails to properly remove

I have a game with a punching bag where I want to incorporate an animation class each time the bag is clicked. Once the health meter hits zero, I intend to replace the bag image with one depicting a burst bag. Things are running smoothly up until the poin ...

Utilize Bootstrap's form-inline feature to arrange fields side by side in one neat

I am looking to customize my sign-in form layout by displaying the fields in a row next to each other rather than under each other. header: Update: I have successfully implemented this code <header class="navbar navbar-fixed-top navbar-inverse"> & ...

Use the CSS class

To create tables with 3 rows and 2 columns using divs, I have utilized the ng-repeat directive. Within this setup, there are two CSS classes - red and green, that need to be applied in the following manner: - Red class for the 1st column of the 1st row - ...