Spacing between bootstrap elements 4 - html

Our website use bootstrap 4.x
Currently is:
How to add spacing between this elements?
Below is full code Bootstrap:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<div class="banner-slider-top banner-slider-cat">
<div class="row">
<div class="d-none d-xl-block col-lg-3 bn-menu">menu</div>
<div class="col-12 col-xl-9">
<div class="row no-gutters bn-inner">
<div class="col-12 col-sm-12 col-md-7">
<div class="item-bn-slider-05 slider-2 lazyload">
<div class="owl-carousel owl-theme">
<div class="item-slider">
<div class="img-slide">slider</div>
<div class="block-center">
<p class="text-small animated fadeInDownSlide"><span style="color: #3078a6;">LIMITED EDITION</span></p>
<h2 class="text-large animated fadeInDownSlide delay-0s5">Baby Hipseat<br>Carrier<br>Waist Stool</h2>
<div class="text-normal animated fadeInDownSlide delay-1s">
<div>Discount</div>
<p>40% Off</p>
</div>
<div class="btn-wrap animated fadeInDownSlide delay-1s5"><a class="btn-shopnow action primary" href="#"><span>Shop now</span></a></div>
</div>
</div>
</div>
</div>
<script type="text/javascript" xml="space">
// <![CDATA[
require(['jquery', 'owlWidget'], function($) {
$(function() {
$('.item-bn-slider-05').owlWidget({
autoplay: true,
items: 1,
autoplayTimeout: 8000,
dots: true,
nav: true,
loop: true,
margin: 0
});
});
});
// ]]>
</script>
</div>
<div class="col-12 col-sm-12 col-md-5">
<div class="row no-gutters">
<div class="col-6 col-sm-6">
<div class="item-bn-inner">image1</div>
</div>
<div class="col-6 col-sm-6">
<div class="item-bn-inner">image2</div>
</div>
<div class="col-12 col-sm-12">
<div class="item-bn-inner">image3</div>
</div>
</div>
</div>
<div class="col-12 col-sm-12">
<div class="row no-gutters">
<div class="col-12 col-sm-12 col-md-7">
<div class="item-bn-inner">image4</div>
</div>
<div class="col-12 col-sm-12 col-md-5">
<div class="row no-gutters">
<div class="col-6 col-sm-6">
<div class="item-bn-inner">image5</div>
</div>
<div class="col-6 col-sm-6">
<div class="item-bn-inner">image6</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
I would like an effect similar to:
Could someone please help how can i do this? I will be grateful for any hint. I searched the forum but unfortunately I don't see any similar solution here. Thanks again to everyone for the help.

So you should add a padding to the main container:
.banner-slider-cat .bn-inner{
padding:0 10px 10px 0;
}
The padding is just on right and bottom because you'll have a margin on items on left and top:
.item-bn-inner, .slider-2 {
margin-left: 10px;
margin-top: 10px;
}
The you have to resize the "Combo 5x newborn..." container to 182px:
.item-bn-inner .item-bn{
height: 182px;
}

You should add margin to the elements, you could do margin-right, margin-top etc. Margin will create extra space between an element ( class ) you put it on.
margin-top: 10px;
margin-left: 10px;
margin-right: 10px;
margin-bottom: 10px;
margin: 10px;
In your case:
.item-bn-inner{margin:10px}

Related

Add margin between items in a bootstrap grid

I created a bootstrap grid that has 3 rows with the following layout.
All I'm trying to do is add a bit of margin between them but as you can see, the columns and rows are not longer properly aligned.
Is there a way to fix it or maybe there's a better way to achieve what I want?
#featured {
margin-bottom: 15px;
}
.featured-1 {
height: 200px;
}
.featured-2 {
height: 50%;
margin-left: 5px;
}
.featured-3 {
height: 50%;
margin-left: 5px;
margin-top: 5px;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#5.2.2/dist/css/bootstrap.min.css" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<div class="container">
<div class="row featured-1" id="featured">
<div class="col-md-7 col-sm-12 bg-warning">
Featured 1
</div>
<div class="col-md-5">
<div class="row featured-2">
<div class="col-md-12 col-sm-12 bg-danger">
Featured 2
</div>
</div>
<div class="row featured-3">
<div class="col-md-12 col-sm-12 bg-success">
Featured 3
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-12 bg-primary">For reference</div>
</div>
</div>
The official bootstrap document recommended the use of Gutter.
you can do this like below:
.featured-1 {
height: 200px;
}
.featured-2, .featured-3 {
height: 50%;
}
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<div class="container">
<div class="row featured-1" id="featured">
<div class="col-md-7 col-sm-12 bg-warning">
Featured 1
</div>
<div class="col-md-5 px-4">
<div class="row featured-2">
<div class="col-md-12 col-sm-12 bg-danger">
Featured 2
</div>
</div>
<div class="row featured-3">
<div class="col-md-12 col-sm-12 bg-success gy-2">
Featured 3
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 bg-primary gy-2">For reference</div>
</div>
</div>
There's already padding on the columns, which acts as gutters. I'd put the background on your column content instead.
#featured {
margin-bottom: 15px;
}
.featured-1>div {
height: 200px;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#5.2.2/dist/css/bootstrap.min.css" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<div class="container">
<div class="row" id="featured">
<div class="col-7 featured-1">
<div class="bg-warning">Featured 1</div>
</div>
<div class="col-5 d-flex flex-column">
<div class="featured-2 flex-grow-1 bg-danger mb-1">Featured 2</div>
<div class="featured-3 flex-grow-1 bg-success mt-1">Featured 3</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="bg-primary">For reference</div>
</div>
</div>
</div>

How to make image DIVs take the same hight when responsive?

I'm creating an image gallery and I need my thumbnail section to stay the same height as my "big" image section. To make this clearer I recorded a short clip: https://www.screenmailer.com/v/9gdopLeaugePvBk . As you can see, the "big" image gets slightly shorter than the thumbnail section. I've read other posts here but none have worked for me.
.container {
max-width: 98%;
margin: 0 auto;
}
.thumbnail-container {
height: auto;
border: 1px solid;
}
.thumbnail-wrapper {
padding-top: 16px;
height: auto;
}
.img-holder {
height: auto;
margin-bottom: 19px;
padding-left: 0;
padding-right: 0;
}
.main-img-wrapper {
height: auto;
}
.main-img-holder {
margin-top: 16px;
margin-bottom: 16px;
padding: 0;
height: auto;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<div class="container mt-4">
<div class="row">
<!-- Image Section -->
<div class="col-lg-7 col-md-12 col-sm-12 col-12 card thumbnail-container">
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2 col-2 thumbnail-wrapper">
<div class="col-12 img-holder"><img src="https://via.placeholder.com/126x85" class="img-fluid"></div>
<div class="col-12 img-holder"><img src="https://via.placeholder.com/126x85" class="img-fluid"></div>
<div class="col-12 img-holder"><img src="https://via.placeholder.com/126x85" class="img-fluid"></div>
<div class="col-12 img-holder"><img src="https://via.placeholder.com/126x85" class="img-fluid"></div>
<div class="col-12 img-holder"><img src="https://via.placeholder.com/126x85" class="img-fluid"></div>
</div>
<div class="col-lg-10 col-md-10 col-sm-10 col-10 main-img-wrapper">
<div class="col-lg-12 main-img-holder">
<img src="https://via.placeholder.com/765x500" class="img-fluid">
</div>
</div>
</div>
</div>
</div>
</div>
Take a look at the flex utilities of Bootstrap. What you need is another flexbox container with flex-direction: column in combination with justify-content: space-between. A height of 100% is important too.
For your example it's necessary to wrap the items on the left column and use the following utility classes to achieve this: d-flex flex-column justify-content-between h-100
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container mt-4">
<div class="row">
<!-- Image Section -->
<div class="col-lg-7 col-md-12 col-sm-12 col-12 card thumbnail-container">
<div class="row">
<div class="col-lg-2 col-md-2 col-sm-2 col-2 thumbnail-wrapper">
<div class="d-flex flex-column justify-content-between h-100">
<div class="img-holder"><img src="https://via.placeholder.com/126x85" class="img-fluid"></div>
<div class="img-holder"><img src="https://via.placeholder.com/126x85" class="img-fluid"></div>
<div class="img-holder"><img src="https://via.placeholder.com/126x85" class="img-fluid"></div>
<div class="img-holder"><img src="https://via.placeholder.com/126x85" class="img-fluid"></div>
<div class="img-holder"><img src="https://via.placeholder.com/126x85" class="img-fluid"></div>
</div>
</div>
<div class="col-lg-10 col-md-10 col-sm-10 col-10 main-img-wrapper">
<div class="col-lg-12 main-img-holder">
<img src="https://via.placeholder.com/765x500" class="img-fluid">
</div>
</div>
</div>
</div>
</div>
</div>

Bootstrap grid overflow with images

I´m trying to acchive this image gallery using bootstrap grid layout:
but I can´t overflow the last image on the second row into the first row...
Here is my html code:
.gal-container {
display: block;
width: 100%;
padding: 16px;
}
.nopadding {
padding: 0 !important;
margin: 0 !important;
}
.box {
padding: 32px;
}
.row img {
max-width: 100%;
max-height: 100%;
}
<section>
<div class="gal-container">
<div class="box">
<div class="row">
<div class="col-sm-6 nopadding"><img src="img/image1.jpg"></div>
<div class="col-sm-3 nopadding"><img src="img/image2.jpg"></div>
<div class="col-sm-3 nopadding"><img src="img/image3.jpg"></div>
</div>
<div class="row">
<div class="col-sm-3 nopadding"><img src="img/image4.jpg"></div>
<div class="col-sm-3 nopadding"><img src="img/image5.jpg"></div>
<div class="col-sm-6 nopadding"><img src="img/image6.jpg"></div>
</div>
</div>
</div>
</section>
The result of this code is this:
I would appreciate the help to put the Stranger Things image at the bottom of the two small pictures :)
There's absolutely no custom css needed for this and the job can be done with less code using native Bootstrap 4 classes alone:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<section class="container">
<div class="row no-gutters">
<div class="col-sm-6">
<div class="row no-gutters">
<div class="col-12"><img src="img/image1.jpg"></div>
<div class="col-sm-6"><img src="img/image2.jpg"></div>
<div class="col-sm-6"><img src="img/image3.jpg"></div>
</div>
</div>
<div class="col-sm-6">
<div class="row no-gutters">
<div class="col-sm-6"><img src="img/image4.jpg"></div>
<div class="col-sm-6"><img src="img/image5.jpg"></div>
<div class="col"><img src="img/image6.jpg"></div>
</div>
</div>
</div>
</section>
Your markup is not matching as per your desired layout.It should be something like this :
<div class="box">
<div class="row">
<div class="col-sm-6 nopadding">
<div class="col-sm-12 nopadding">
<img src="img/image1.jpg">
</div>
<div class="row">
<div class="col-sm-6 nopadding">
<img src="img/image2.jpg">
</div>
<div class="col-sm-6 nopadding">
<img src="img/image3.jpg">
</div>
</div>
</div>
<div class="col-sm-6 nopadding">
<div class="col-sm-12 nopadding">
<img src="img/image4.jpg">
</div>
<div class="row">
<div class="col-sm-6 nopadding">
<img src="img/image5.jpg">
</div>
<div class="col-sm-6 nopadding">
<img src="img/image6.jpg">
</div>
</div>
</div>
</div>
</div>
Also add overflow:hidden in nopadding.
Hope it helps !
If you just swap around positioning and the wrappers, you should be able to get your desired effect
Also, you will have to take into account the paddings and widths you need as they will affect the positioning of the elements.
Demo works in full screen due to size
.gal-container {
display: block;
width: 600px;
padding: 16px;
}
.nopadding {
padding: 0 !important;
margin: 0 !important;
}
.box {
padding: 30px;
}
.row img {
max-width: 100%;
max-height: 100%;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="gal-container">
<div class="row">
<div class="col-sm-6 nopadding">
<div class="col-sm-12 nopadding"> <img src="http://via.placeholder.com/300x150"> </div>
<div class="col-sm-6 nopadding"> <img src="http://via.placeholder.com/150x100"> </div>
<div class="col-sm-6 nopadding"> <img src="http://via.placeholder.com/150x100"> </div>
</div>
<div class="col-sm-6 nopadding">
<div class="col-sm-6 nopadding"> <img src="http://via.placeholder.com/150x100"> </div>
<div class="col-sm-6 nopadding"> <img src="http://via.placeholder.com/150x100"> </div>
<div class="col-sm-12 nopadding"> <img src="http://via.placeholder.com/300x150"></div>
</div>
</div>
</div>

How to set padding in the divs in CSS

My whole code is this how to set spacing b/w the divs ?It must run smoothly on all devices
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<body>
<div class="container" style="width:100%">
<div class="row" style="height:33%">
<div class="col-xs-3" style="height:100%;background-color:#003380;"></div>
<div class="col-xs-6 text-center"style="height:100%;background-color:#66a3ff;padding-left: 20px">Top </div>
<div class="col-xs-3 " style="height:100%;background-color:#cce0ff"></div>
</div>
<div class="row" style="height:33%">
<div class="col-xs-3" style="height:100%;background-color:#66a3ff"></div>
</div>
<div class="row" style="height:33%">
<div class="col-xs-3 " style="height:100%;background-color:#cce0ff">left</div>
<div class="col-xs-6 " style="height:100%;background-color:#66a3ff">Center</div>
<div class="col-xs-3 " style="height:100%;background-color:#003380">Right </div>
</div>
</div>
</body>
You could wrap another column around the elements, which makes that the padding of the wrapping column provides some sort of margin/spacing.
Is the below code something you are aiming for?
.spacing {
padding: 15px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<body>
<div class="container" style="width:100%">
<div class="row" style="height:33%">
<div class="col-xs-3 spacing">
<div class="col-xs-12" style="height:100%;background-color:#003380;"></div>
</div>
<div class="col-xs-6 spacing">
<div class="col-xs-12 text-center"style="height:100%;background-color:#66a3ff;padding-left: 20px">Top </div>
</div>
<div class="col-xs-3 spacing">
<div class="col-xs-12" style="height:100%;background-color:#cce0ff"></div>
</div>
</div>
<div class="row" style="height:33%">
<div class="col-xs-3 spacing">
<div class="col-xs-12" style="height:100%;background-color:#66a3ff"></div>
</div>
</div>
<div class="row" style="height:33%">
<div class="col-xs-3 spacing">
<div class="col-xs-12" style="height:100%;background-color:#cce0ff">left</div>
</div>
<div class="col-xs-6 spacing">
<div class="col-xs-12" style="height:100%;background-color:#66a3ff">Center</div>
</div>
<div class="col-xs-3 spacing">
<div class="col-xs-12" style="height:100%;background-color:#003380">Right </div>
</div>
</div>
</div>
</body>
EDIT:
Since you are looking for spacing in all directions (and not only left and right), you can just add an extra class to the wrappers called spacing and the following CSS: (see updated code snippet)
.spacing {
padding: 15px;
}
There are multiple ways to achieve that:
By wrapping your each col with another col
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" type="text/css" media="screen" />
</head>
<body>
<div class="container" style="width:100%">
<div class="row" style="height:33%">
<div class="col-xs-3"><div class="col-xs-12" style="height:100%;background-color:#003380;"></div></div>
<div class="col-xs-6"><div class="col-xs-12 text-center"style="height:100%;background-color:#66a3ff;padding-left: 20px">Top </div></div>
<div class="col-xs-3"><div class="col-xs-12 " style="height:100%;background-color:#cce0ff"></div></div>
</div>
<div class="row" style="height:33%">
<div class="col-xs-3"><div class="col-xs-12 " style="height:100%;background-color:#cce0ff">left</div></div>
<div class="col-xs-6"><div class="col-xs-12 " style="height:100%;background-color:#66a3ff">Center</div></div>
<div class="col-xs-3"><div class="col-xs-12 " style="height:100%;background-color:#003380">Right </div></div>
</div>
</div>
</body>
This will create default space of 30px between two column
If you wish to create more space then you can use col-xs-offset classes from bootstrap. But this will decrease the size of your columns
You can always use custom classes of your own to change the grid as you want
Easiest would be using a flexbox for the row and padding for the flex items.
.row {
display: flex;
justify-content: space-between;
}
.row div { padding: 1em; }
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<div class="container" style="width:100%">
<div class="row">
<div class="col-xs-3" style="background-color:#003380;">X</div>
<div class="col-xs-6 text-center" style="background-color:#66a3ff;">Top </div>
<div class="col-xs-3 " style="background-color:#cce0ff">X</div>
</div>
<div class="row">
<div class="col-xs-3" style="background-color:#66a3ff">X</div>
</div>
<div class="row">
<div class="col-xs-3 " style="background-color:#cce0ff">left</div>
<div class="col-xs-6 " style="background-color:#66a3ff">Center</div>
<div class="col-xs-3 " style="background-color:#003380">Right </div>
</div>
</div>
#Aviral Garg Please check following code. I have modified style properties in your code and added classes "common_row" & "common_box" in it, with some properties. You can adjust padding in "common_box" class & margin-bootom in "common_row" class according to your need. It will work fine on all devices as I have added grid classes in it. I hope you were expecting the same.
.common_row{
height:33%;
margin-bottom:10px;
}
.common_row .common_box{
padding:10px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container" style="width:100%">
<div class="row common_row">
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 common_box" style="background-color:#003380;"></div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 text-center common_box"style="background-color:#66a3ff;">Top </div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 " style="background-color:#cce0ff"></div>
</div>
<div class="row common_row" style="height:33%">
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 common_box" style="background-color:#66a3ff"></div>
</div>
<div class="row common_row">
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 common_box" style="background-color:#cce0ff">left</div>
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 common_box" style="background-color:#66a3ff">Center</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 common_box" style="background-color:#003380">Right </div>
</div>
</div>
If I am right, you want spacing between the divs of class row without a spacing between the container div and its child divs(div.row).
For this you can add bottom margins to all divs except the last div. This can be done as so:
div.row{
margin-bottom: [whatever amount of space you want]; //add bottom margin to the row divs
}
div.row:last-child{
margin-bottom: none; //remove bottom margin from the row div that happens to be the last child in its container(i.e. div.container)
}
If you want to have spacing between the childs of rows too:
div.row{
margin-bottom: [whatever amount of space you want]; //add bottom margin to the row divs
}
div.row:last-child{
margin-bottom: none; //remove bottom margin from the row div that happens to be the last child in its container(i.e. div.container)
}
div.col-xs-3{
margin: [top margin], 0, [bottom margin], 0;
}
div.col-xs-6{
margin: [topmargin], 0, [bottom margin], 0;
}
Try adding this class to your stylesheet
Pad-10{
padding:1%;
}
and then add the class to your divs
<div class="row Pad-10" style="height:33%">

Creating a black and white grid HTML/CSS

I am trying to create a 3 by 3 black and white grid. But instead only black square is showing. I have tried using Bootstrap.
My one square of the grid should cover 3 grids space as per bootstrap grid system and I am using padding-top:100% to maintain the aspect ratio for the squares in the 3 by 3 grid.
body {
margin: 0;
color: pink;
}
.square {
width: 100%;
padding-top: 100%;
background-color: black;
}
.square-w {
width: 100%;
padding-top: 100%;
background-color: white;
}
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" />
<div class="container-fluid">
<div class="row">
<div class="col-md-3">
<div class="square"></div>
</div>
<div class=" col-md-3 ">
<div class="square-w"></div>
</div>
<div class=" col-md-3 ">
<div class="square"></div>
</div>
</div>
<div class="row">
<div class=" col-md-3">
<div class="square-w"></div>
</div>
<div class="col-md-3 ">
<div class="square"></div>
</div>
<div class="col-md-3">
<div class="square-w"></div>
</div>
</div>
<div class="row">
<div class="col-md-3 ">
<div class="square"></div>
</div>
<div class="col-md-3 ">
<div class="square-w"></div>
</div>
<div class="col-md-3 ">
<div class="square"></div>
</div>
</div>
</div>
Your screen view might be too small.
Changing all the col-md-3 classes to col-sm-3 allows it to be shown on my view
JSFiddle: https://jsfiddle.net/2k5523ym/1/
You just need to put below code in css
.nopadding {
padding: 0 !important;
margin: 0 !important;
}
and then assign nopadding class to every col-md-3 div
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" />
<div class="container-fluid">
<div class="row">
<div class="col-md-3 nopadding">
<div class="square"></div>
</div>
<div class=" col-md-3 nopadding">
<div class="square-w"></div>
</div>
<div class=" col-md-3 nopadding">
<div class="square"></div>
</div>
</div>
<div class="row">
<div class=" col-md-3 nopadding">
<div class="square-w"></div>
</div>
<div class="col-md-3 nopadding">
<div class="square"></div>
</div>
<div class="col-md-3 nopadding">
<div class="square-w"></div>
</div>
</div>
<div class="row">
<div class="col-md-3 nopadding">
<div class="square"></div>
</div>
<div class="col-md-3 nopadding">
<div class="square-w"></div>
</div>
<div class="col-md-3 nopadding">
<div class="square"></div>
</div>
</div>
</div>
Hope this help you