Ways to eliminate the gap between columns without using gutters

I implemented the code below to create two columns, but there seems to be some space between them. How can I remove this space, considering that I am using "no-gutter"?

Check out the image here: https://ibb.co/80zTh60

<section id="incubator">
    <div class="overlay">
    <div class="row no-gutters">
        <div class="col-xs-12 col-md-6 incu-color rebeccapurple">

        </div>
        <div class="col-xs-12 col-md-6 incu-img">
            <img src="img/Facility/dedicated.jpg" alt="De">
        </div>
    </div>
    </div>      
</section>
#incubator{
    padding: 0;
    text-align: center;
    margin: 0;
}
.incu-color{
    height: 400px;
}
.incu-color.rebeccapurple{
    background-color: rebeccapurple;
}
.incu-img img{
    position: absolute;
    display: block;
    top: -100px;
    right: 0;
    height: 500px;
    max-width: 100%;
}
.incu-text{
    width: 100%;
    padding: 10px;
    background-color: darkorchid;
}

Answer №1

To eliminate the padding added by default to col-md-6 by Bootstrap, you can create a custom class:

.nopadding {
    padding: 0 !important;
 }

Apply this new class to elements containing the col-md-6 class. Alternatively, if you are using Bootstrap 4, you can use the existing p-0 class as suggested in the comments.

HTML:

     <section id="incubator">
    <div class="overlay">
    <div class="row no-gutters">
        <div class="col-xs-12 col-md-6 incu-color rebeccapurple nopadding">

        </div>
        <div class="col-xs-12 col-md-6 incu-img nopadding">
            <img src="https://helpx.adobe.com/content/dam/help/en/stock/how-to/visual-reverse-image-search/jcr_content/main-pars/image/visual-reverse-image-search-v2_intro.jpg" alt="De">
        </div>
    </div>
    </div>      
</section>

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 attempting to create basic animations using css, but I'm having some trouble

Currently, I am attempting to add animation to a css div without including the top property in the original div style. I omitted it because I wanted to delay the animation, so I placed it within the @keyframes property. However, the element disappears afte ...

Leveraging Vue properties within CSS styling

I am looking to utilize Vue data/prop variables within the <style> tag located at the bottom of my component. For example, suppose I have a component structured like this: <template> <div class="cl"></div> </template> < ...

Is it possible in JQuery for the mouseup event to not be triggered if the left click button is held down for 10 seconds and then released suddenly, causing the mouse to move too quickly?

How to Move a DIV Inside Another Parent DIV Using Mouse Events in jQuery $(document).ready(function () { var drag = null; var Top = null; var Left = null; var O = $("#Outside").offset(); var outside ...

Create a scrollable Bootstrap table without impacting the layout grid system

Is there a way to create a scrollable table without impacting the grid system layout? How do I make a table scrollable while keeping the col-xs tag intact? <table class="col-xs-12"> <thead> <th class="c ...

I am attempting to change a "+" symbol to a "-" symbol using a Bootstrap toggle feature

Click on the text to reveal more information that drops down below. I am using Bootstrap icons and attempting to show a "+" icon when the toggle is collapsed, and a "-" icon when it's open. I've been trying to use display properties, but haven&ap ...

How can I ensure that the Bootstrap datePicker is validated as a required field

I am using the it-date-datepicker as a calendar picker, which is a bootstrap-datepicker version based on ab-datepicker. The issue I am facing is that I need to make this field mandatory. I downloaded jquery.validate.js for this purpose but I can't see ...

Transforming content dynamically

I am currently working on a single-page website that features a comprehensive product catalog. Here are the key elements I'm focusing on: A one-page website layout, complete with header, content, and footer (developed using HTML5/CSS3) Dynamic cont ...

Snug enclosure surrounding an image

I'm currently working on creating a chat application and I need the chat bubbles to snugly wrap around their contents. It's working fine for text, but when an image is included in the bubble, it creates some issues. Below is the HTML code that I ...

Applying CSS transition delays to multiple images

I'm having trouble implementing a transition delay in my CSS. I've tried adding it in various places but it doesn't seem to be working as expected. This is my CSS: .imageBox { position: relative; float: left; transition ...

How can I incorporate margins or adjust scaling within dompdf?

After creating a PDF using dompdf with the paper size set to A6, I am experiencing issues when trying to print it on A4 and letter paper sizes. The left and top borders are being cut off. Is there a way to generate a PDF that is compatible with A4, A6, l ...

Implement Offcanvas feature with Bootstrap 3 Navbar set to Fixed Top position

I am in the process of creating a website that will feature a large menu. However, I am not a fan of the collapsed menu that comes with BS3. Instead, I would like to implement a drawer or off-canvas menu similar to the one showcased in BS3's offcanvas ...

What is the best way to create a full-width bottom menu for my app using HTML and CSS?

I encountered an issue with the bottom navbar menu on the mobile version of my website. It appears as an app-like bottom menu and looks great on most devices except for those with a 320px width size. In these cases, the navbar does not stretch to fill the ...

Slider buttons are not appearing in Time Picker

I recently added a Time Picker to my project, but I'm experiencing an issue where the slider buttons for selecting time are not showing up. Could you please refer to this image: Checking the console, there don't seem to be any errors present. ...

What is the best way to eliminate the text-decoration underline from a flex child when the parent is designated as the anchor?

I need help removing the text-decoration of a flex child when the parent is the anchor. Despite trying various CSS code, it doesn't seem to work as expected. On my WordPress site, the underline only shows on hover, but in the jsFiddle example I create ...

What is the best way to develop an expanding line animation from this starting point?

I have a vision for an animation where, upon hovering over an icon, it enlarges, increases in opacity, and reveals some accompanying text. The visual effect I am aiming for involves two lines of color expanding horizontally from the center outwards before ...

Utilizing grid for styling headings and paragraphs with h3, h4, and p tags

Looking for help with aligning posts in columns? Here's the code and display challenge: <div class="post-inner"> <h3 class="post-header"><a class="post-title" href="http://www.yellowfishjobs.com/job/sales-representative/">Sales Repr ...

What could be the reason for my Form styling failure?

Currently working on freecodecamp's portfolio creation exercise. It should be a straightforward task, but I'm facing a small issue that's puzzling me. I'm trying to remove the border and outline (when focused) from my contact-area form ...

What is the method for activating the on collapse event with a bootstrap navbar?

I am encountering a common issue with collapsing the navbar on smaller screens and triggering an event when the collapse button icon is clicked. Despite my efforts to find a solution, I have been unsuccessful in using the following JavaScript code: $(&apos ...

Adjusting the size of a Bootstrap toggle switch

I'm working with a bootstrap toggle switch that appears to be too small for my needs. I've only used the following code, relying solely on Bootstrap classes without any additional CSS: <div class="custom-control custom-switch"> ...

When the mobile navigation bar is tapped, it remains open instead of closing

The persistent challenge of the mobile navbar failing to close upon clicking an item continues to baffle. Numerous attempts from Stack Overflow and even tweaks recommended by ChatGPT have been futile in resolving this issue. Despite trying alternative me ...