A method for decreasing the space between columns on a 7-grid Bootstrap layout

I'm currently working on an application using Vue.js and Bootstrap. I've customized a 7-column layout with the following code:

@media (min-width: 768px){
  .seven-cols .col-md-1,
  .seven-cols .col-sm-1,
  .seven-cols .col-lg-1  {
    width: 100%;
    *width: 100%;
  }
}
@media (min-width: 992px) {
  .seven-cols .col-md-1,
  .seven-cols .col-sm-1,
  .seven-cols .col-lg-1 {
    width: 14.285714285714285714285714285714%;
    *width: 14.285714285714285714285714285714%;
    max-width: 14.285714285714285714285714285714% !important;
flex:none !important;
  }
}
 
@media (min-width: 1200px) {
  .seven-cols .col-md-1,
  .seven-cols .col-sm-1,
  .seven-cols .col-lg-1 {
    width: 14.285714285714285714285714285714%;
    *width: 14.285714285714285714285714285714%;
    max-width: 14.285714285714285714285714285714% !important;
flex:none !important;
  }
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div class="row seven-cols">
  <div class="col-md-1" v-for="(folder,index) in folders">
    <stats-card>
      <div slot="header" :data-key="index" class="folder-rectangle" @click="selected=index" :class="{'folder-selected':selected==index}">
        <div class="row">
          <div class="col-2">
            <div class="clearfix" v-if="folder.shared" style="margin-top: 8px; margin-left: 10px;">
              <i class="material-icons" id="folder-image">&#xe2c9;</i>
            </div>
            <div class="clearfix" style="margin-top: 8px; margin-left: 10px;" v-else>
              <i class="material-icons" id="folder-image">folder</i>
            </div>
          </div>
          <div class="col-10">
            <div class="clearfix">
              <div class="row">
                <p class="folder-name-style">{{folder.name}}</p>
              </div>
              <div class="row">
                <p class="folder-size-style">{{folder.numFiles}} files</p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </stats-card>
  </div>
</div>

Even though the 7 columns are displayed properly, there seems to be excessive space between each column. Here's how they currently look:

https://i.sstatic.net/R8hFD.png

What would be the best way to reduce this spacing between the columns?

Answer №1

To eliminate the gap, include the following CSS in col-md-1: padding-left: 0 !important; and padding-right: 0 !important;.

Hopefully this solution resolves your issue.

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

Issues Arising with Examples of Fixed Header Tables in Angular 7

I've encountered a major issue with fixed header tables in relation to my Angular application. Utilizing the examples provided here and here, I initially thought it was a problem within my component. However, after embedding the same code into my inde ...

Substituting Specific Content on a Webpage

I need to update a specific phone number within a paragraph without accessing the code inside the body myself. It has been provided by our partner and I am unable to modify it directly. If you would like to explore different options, please reach out to ...

how to change the padding in bootstrap container

I'm working with a div that has the container bootstrap class applied to it. This class adds a 15px padding on the left and right sides. I want to maintain this padding for all the children elements within the container, but I also want one specific d ...

Adding an arrow between two divs in html and css

I am looking to add an arrow between two divs. Here is an example image for reference: https://i.sstatic.net/Sl5A8.png This is my current setup: <style> .link{ font-size: 14px; margin-bottom: 10px; } ...

Tips for aligning a textbox and label in the same row with Bootstrap

Is there a way to align two text boxes and a drop-down in the same row while displaying labels below them? I want the layout to look like this: https://i.sstatic.net/eQZnn.png Currently, my code is displaying the text boxes stacked on top of each other. ...

Icon not appearing within the input group

Is there a way to design an input group that includes both a text field and an icon placed at the beginning of the text field? The code below demonstrates my attempted implementation, however, it appears that only the text field is visible without the acco ...

How can we make buttons in jQuery display a larger picture when the user hovers over them?

I am working on creating a unique left-horizontal navigation bar that resembles a bookcase. The books will be arranged horizontally, with each book representing a different link. Each button will have two states - static (just a book) and hovering (a 3D l ...

How can you position navbar links to the right in Bootstrap?

I have been given an assignment that requires me to create HTML code to replicate a specific webpage design, which can be viewed here: https://i.sstatic.net/GC68r.png One of the requirements is to align the Home, Contact, About Us, and Messages links to t ...

Receive the most current PHP information within JavaScript

I am attempting to update the content of a div on my HTML page every time a button labeled refresh is clicked. The goal is to invoke a JavaScript function when the user clicks the button, and this function should refresh the contents of the div with data r ...

Preserve the chosen List group element with Vue.js

Currently, I am in the process of creating a Quiz application. The issue I am encountering is that when a user selects an answer, the selected list item class becomes active. However, if the user then chooses the answer to another question, the borders on ...

The Bootstrap 5 mega menu vanishes in the blink of an eye

Having some trouble with my Bootstrap 5 mega dropdown. It seems to disappear too quickly when I try to select the contents. I suspect there may be some CSS causing this issue, but I can't seem to pinpoint it. I've already attempted to adjust the ...

An interactive CSS tutorial platform likened to tryruby.org or codecademy.com for mastering CSS skills

Last year, as I was delving into the world of Ruby, I completed a quick course at TryRuby. It’s an interactive terminal that guides you through executing ruby commands and helps you grasp the language. Similarly, at Codecademy, they challenge you to tac ...

Utilizing jQuery for seamless transitions between multiple background images

Looking to create a dynamic page using jQuery that alternates between different large background images for a fading effect. How can I achieve this? ...

How can we use fetch to grab some data?

I put together an Express application quickly, here's how it looks: const express = require("express"); const app = express(); const port = 3000; app.get("/content/1/", (req, res) => res.send("Thinking about taking out a new loan? Call us today. ...

What is the best way to assign a background color to each tr element using JavaScript?

I have a list of table rows with different background colors like <tr bgcolor="#OC6110"> <tr bgcolor="#000000"> <tr bgcolor="#FFFFFF"> Is there a way to assign unique background colors to each tr element without specifying its id value ...

The issue with Smooth Scroll not functioning arises when the height of both the html and body is set to 100%

html, body { height: 100%; min-height: 100%; position: relative; } #home { height: 100%; background: url("../img/test.jpg") center no-repeat; background-size: cover; } I've incorporated the Smooth Scroll JavaScript by CSS-Tricks $ ...

Can the layout of my page be modified for mobile in a specific manner using the Bootstrap 4 grid system?

At the moment, I have my bootstrap grid structured like this <div class="container"> <div class="row"> <div class="col-4"> <div class="A"> A </div> </div ...

Tips for placing a button alongside an input field within a form-group and form-row class in Bootstrap 4

I am having trouble with aligning buttons inline with input fields using Bootstrap classes. Whenever I try to place a button next to an input field, it either drops below the input or doesn't stay aligned properly. Specifically, I would like to posi ...

React Application Appearing Distinct in Localhost and gh-pages Environment

Hello, I am new to React and currently working on building a portfolio. I encountered an issue while using the react-mdl library for the projects page. Specifically, when viewing my project on a mobile interface (tested on FireFox, Chrome dev tools, and On ...

Efficiently Delivering a Video Stream Using Spring Boot and Ajax Requests

I've been searching for a comprehensive tutorial on how to stream video in springboot using an ajax call, but it seems like I haven't come across the right one yet. In my application, I have a video file stored on the server. How can I play this ...