Bootstrap 4: Embrace the seamless flow of columns with no gaps in

Recently, I encountered an issue with columns in Bootstrap 4. Despite writing the code correctly, there appears to be no space between the 3 blocks displayed in the browser. Each block consists of 4 columns, but they seem to be directly adjacent to each other without any margin.

My attempt to resolve this involved tweaking the padding in Bootstrap 4, which unfortunately exacerbated the situation. However, for a live demonstration and potential editing, I have linked the code on CodePen. Feel free to check it out here: https://codepen.io/PlatoCode/pen/erWaXg

<section class="jobs">
 <div class="container">
      <div class="row">
           <div class="col-md-4 single_job">
                <span style="color: rgb(232, 61, 98);">toronto, canada</span>
                <h5>Web Designer</h5>
                <p>Development Team</p>
                <a href="#" class="btn" style="background-color: rgb(232,61,98);">Apply Now</a>
           </div>
           <div class="col-md-4 single_job">
                <span style="color: rgb(232, 61, 98);">toronto, canada</span>
                <h5>Web Designer</h5>
                <p>Development Team</p>
                <a href="#" class="btn" style="background-color: rgb(232,61,98);">Apply Now</a>
           </div>
           <div class="col-md-4 single_job">
                <span style="color: rgb(232, 61, 98);">toronto, canada</span>
                <h5>Web Designer</h5>
                <p>Development Team</p>
                <a href="#" class="btn" style="background-color: rgb(232,61,98);">Apply Now</a>
           </div>
      </div>
 </div>

CSS :-

 /*----- Custom Styling ----*/
 html { -webkit-font-smoothing: antialiased;
  }
 body {
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    color: #1c1c1c;
    height: 100%;
    min-height: 100%;
 }
  
 /* Update Font Styles */
 h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
    color: #1c1c1c;
    margin-top: 0
 }

 /* Adjust Headings Sizes */
 h1 { font-size: 2.813em; }
 h2 { font-size: 2.5em; }
 h3 { font-size: 2em; }
 h4 { font-size: 1.438em; }
 h5 { font-size: 1.25em; }
 h6 { font-size: 1.125em; }

 /* List Styling */
 ul, ol { list-style: none; line-height: 1.85714286em; }

 /* Paragraph Styling */
 p {
    font-family: 'Roboto';
    font-size: 0.938em;
    color: #889094;
 }

 /* Button Styling */
 .btn {
    display: inline-block;
    background-color: #50b1fc;
    text-align: center;
    cursor: pointer;
    color: #fff;
    border-radius: 38px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    overflow: hidden;
    position: relative;
    z-index: 0;
    vertical-align: middle;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    text-decoration: none;
    text-shadow: none;
    padding: 10px 30px;
 }

 .btn:hover { color: white; }

 .btn2 {
    display: inline-block;
    background-color: #fff;
    text-align: center;
    cursor: pointer;
    color: #010d2f;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    overflow: hidden;
    position: relative;
    z-index: 0;
    vertical-align: middle;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
    text-decoration: none;
    text-shadow: none;
    padding: 10px 30px;
 }

 .btn2:hover { color: #010d2f; }

 /* Job Postings */
 .single_job {
    background-color: #fff;
    -webkit-box-shadow: 0 0 38px rgba(0,0,0,.08);
    -moz-box-shadow: 0 0 38px rgba(0,0,0,.08);
    box-shadow: 0 0 38px rgba(0,0,0,.08);
    padding: 35px 25px;
 }

 .single_job p { margin-bottom: 25px; }
 .single_job h5 { margin-top: 5px; }

Answer №1

For optimal viewing experience, it is recommended to use a larger screen.
I have incorporated a div and utilized Bootstrap spacing for better layout.
For more information on Bootstrap spacing, check out: https://getbootstrap.com/docs/4.0/utilities/spacing/

html { -webkit-font-smoothing: antialiased;
 }
body {
font-family: "Open Sans", sans-serif;
font-weight: 400;
color: #1c1c1c;
height: 100%;
min-height: 100%;
}

h1, h2, h3, h4, h5, h6 {
font-family: 'Montserrat', sans-serif;
line-height: 1;
color: #1c1c1c;
margin-top: 0
}

h1 {
font-size: 2.813em;
}

h2 {
font-size: 2.5em;
}

h3 {
font-size: 2em;
}

h4 {
font-size:  1.438em;
}

h5 {
font-size: 1.25em;
}

h6 {
font-size: 1.125em;
}

ul,
ol {
  list-style: none;
  line-height: 1.85714286em;
}

p {
font-family: 'Roboto';
font-size: 0.938em;
color: #889094;
}

.btn {
display: inline-block;
background-color: #50b1fc;
text-align: center;
cursor: pointer;
color: #fff;
border-radius: 38px;
font-family: 'Montserrat', sans-serif;
font-size: 11px;
letter-spacing: 1px;
text-transform: uppercase;
overflow: hidden;
position: relative;
z-index: 0;
vertical-align: middle;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
text-decoration: none;
text-shadow: none;
padding: 10px 30px;
}

.btn:hover {
color: white;
}

.btn2 {
display: inline-block;
background-color: #fff;
text-align: center;
cursor: pointer;
color: #010d2f;
border-radius: 10px;
font-family: 'Montserrat', sans-serif;
font-size: 11px;
letter-spacing: 1px;
text-transform: uppercase;
overflow: hidden;
position: relative;
z-index: 0;
vertical-align: middle;
-moz-user-select: none;
-webkit-user-select: none;
user-select: none;
text-decoration: none;
text-shadow: none;
padding: 10px 30px;
}

.btn2:hover {
color: #010d2f;
}


/* Jobs */

.single_job {
background-color: #fff;
-webkit-box-shadow: 0 0 38px rgba(0,0,0,.08);
-moz-box-shadow: 0 0 38px rgba(0,0,0,.08);
box-shadow: 0 0 38px rgba(0,0,0,.08);
padding: 35px 25px;
}

.single_job p {
margin-bottom: 25px;
}
.single_job h5 {
margin-top: 5px;
}
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<section class="jobs">
     <div class="container">
          <div class="row">
               <div class="col-md-4 p-3">
                 <div class="single_job">
                    <span style="color: rgb(232, 61, 98);">toronto, canada</span>
                    <h5>Web Designer</h5>
                    <p>Development Team</p>
                    <a href="#" class="btn" style="background-color: rgb(232,61,98);">Apply Now</a>
                 </div>
               </div>
               <div class="col-md-4 p-3">
                 <div class="single_job">
                    <span style="color: rgb(232, 61, 98);">toronto, canada</span>
                    <h5>Web Designer</h5>
                    <p>Development Team</p>
                    <a href="#" class="btn" style="background-color: rgb(232,61,98);">Apply Now</a>
                   </div>
               </div>
               <div class="col-md-4 p-3">
                  <div class="single_job">
                    <span style="color: rgb(232, 61, 98);">toronto, canada</span>
                    <h5>Web Designer</h5>
                    <p>Development Team</p>
                    <a href="#" class="btn" style="background-color: rgb(232,61,98);">Apply Now</a>
               </div>
                  </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

Using CSS Flex to style text that has been transformed

I'm attempting to achieve a specific date display effect, but I'm running into some difficulties. Despite using flex and text transform, I can't seem to get rid of the extra width on the right side of the year. Here's my current outcom ...

What could be causing the issue of CSS Styles not being applied to an Angular 2 component with Vaadin elements?

Currently, I am immersed in the tutorial on Vaadin elements using Angular 2 that I stumbled upon here In section 5.3, Styles are applied to the app.component.ts as shown below import { Component } from [email protected]/core'; @Component({ select ...

There is a hidden delete button obscured by another element. What steps can be taken to bring that element to the forefront and make it visible?

I'm having trouble positioning a delete button in the top right corner of a collapsible box. Despite setting it to `visibility: visible`, I can't seem to get it to display at the top of the collapsible element. Any suggestions or ideas would be g ...

What is the best way to center CSS content such as boxes and text?

As a beginner in CSS tutorials, I am seeking guidance on how to center the entire content in the browser. Below is the CSS code that needs attention. Additionally, there is a screenshot of the current output included for reference. body { background:#E9 ...

Tips for applying a linear gradient mask to div elements?

I'm attempting to create a fading effect on the edges of a div by using two overlay divs positioned absolutely on either side. My goal is to have the background of the page visible once the fade is complete, effectively masking the content of one div ...

Proper techniques for enlarging a background image using CSS

When utilizing the CSS scale() function along with a transition and transform on a div element that contains a high-quality background image, I noticed that the image becomes blurry when zoomed in. How can I achieve a smoother zoom effect for high-quality ...

Mysterious JQuery attribute

I've come across a piece of code that utilizes an unfamiliar selector that I can't seem to figure out: $("div[tag=" + someVariable + "]").css("display", "block"); From what I gather, the selector is searching for a div element with an attribute ...

Customize your radio buttons to display as stylish boxes with Bootstrap

Check out my Fiddle here... The radio buttons are displaying correctly in the fiddle. <div class="element-radio" title="Do you want to float the text to the left, right, or not at all?"><h4 class="title" style="font-weight: bold;">Float (left ...

I am experiencing a problem with a modal box in WordPress using bootstrap where I am unable to open videos on

I'm currently working on a WordPress site with a bootstrap theme. I am using a modal box to display videos on my page. My question is, can I have two different videos open on the same link? In other words, when I click on the link, one video will appe ...

What is the best way to connect a line from the edge of the circle's outermost arc?

I am attempting to create a label line that extends from the outermost point of the circle, similar to what is shown in this image. https://i.sstatic.net/OqC0p.png var svg = d3.select("body") .append("svg") .append("g") svg.append("g") .attr("cl ...

Bring back the pop-up window upon cancellation

I have encountered an issue with my bootstrap modal. When I submit a form within the modal and then cancel, the validation error messages persist when I reopen it. Is there a way to reset the modal back to its original state after validation? I've at ...

I keep checking my input file, convinced that it's empty even though I've already selected a file

I am currently facing an issue with the upload system using Codeigniter 4 and Bootstrap 4.6x. Everything seems to be working fine except for one specific problem. My intention is to have users upload a screenshot for my leaderboard web app. However, whenev ...

Tips for combining a linear-gradient and background-image on a single element:

Is it possible to apply a linear-gradient color along with a background-image on the same div element in HTML? I've been trying to achieve this but haven't been successful so far. Any suggestions would be greatly appreciated. Below is the snippe ...

How to properly align an object in a specified ul, li list

I'm currently facing an issue while building a Joomla site. I have set a background image for my li elements, but the items within the li are not centered as expected. The website I am working on is www.outlawsofhealth.com. The specific list in quest ...

Tips on aligning a div to the right of a headline

My goal is to have an orange circle image placed to the right of my headline <h2>. However, I am facing an issue where the circle jumps above the headline when I shrink the screen. How can I ensure that it stays on the right side no matter the screen ...

The side modal features a full-height design with headers, bodies, and footers that are

I have created a side modal that extends to full height. The content in the modal body is quite lengthy, but I am facing an issue where the header, body, and footer are not equal in size. I am considering using scrollspy on the HTML body tag to potentially ...

tips for concealing the sorting icon in the DataTables header upon initial load

Is there a way to initially hide the datatable sorting icon upon loading, but have it display automatically when clicking on the header? I've been searching for a solution without success. https://i.sstatic.net/o2Yqa.png ...

Incomplete filling of the SVG element is observed

Trying to animate SVG text to display only the outer stroke of each letter initially, followed by filling the interior with color. However, after the animation finishes, there are unfilled spaces left. Is there a property that can be applied to the SVG o ...

Values are being set back to '1' within the popup dialog

After recently incorporating Twitter Bootstrap into my web app project, everything seemed to be going smoothly until I encountered an issue with a modal window. Following the Bootstrap documentation, I set up a button that triggers a modal window to appea ...

Try employing an alternative angular controller when working with the bootstrap modal

I am trying to implement a bootstrap modal in my main HTML file, and I need some help on how to call another Angular controller for the modal. The button that triggers the modal is within a div that already has an Angular controller, and this is causing th ...