This is how I structured the BootStrap grid to get a layout like yours.
HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Grid test</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="grid.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid">
<h1>Grid test</h1>
</div>
<div class="row">
<div class="col">COL1</div>
<div class="col">COL2</div>
<div class="col">COL3</div>
<div class="col">COL4</div>
</div>
<div class="row">
<div class="col">
<div class="row">
<div class="col">COLa</div>
<div class="col">COLb</div>
</div>
<div class="row">
<div class="col">COLc</div>
<div class="col">COLd</div>
</div>
</div>
<div class="col">COL+</div>
</div>
</body>
</html>
CSS
body {
padding-top: 2rem;
padding-bottom: 2rem;
}
h3 {
margin-top: 2rem;
}
.row {
margin-bottom: 1rem;
}
.row .row {
margin-top: 1rem;
margin-bottom: 0;
}
[class*="col"] {
padding-top: 1rem;
padding-bottom: 1rem;
background-color: rgba(86, 61, 124, .15);
border: 1px solid rgba(86, 61, 124, .2);
}
hr {
margin-top: 2rem;
margin-bottom: 2rem;
}
You now have to modify the CSS margins, colors, alignment, ...
- I used bootstrap v4.1 I just downloaded
- This is based on the bootstrap example http://getbootstrap.com/docs/4.1/examples/grid/
- The grid.css posted here is based on this same site.
- I tried it in Chrome, and am able to resize the window from the smallest possible width to the largest.
EDIT Here are screen prints of the result:
Full width:
![enter image description here]()
Responsive, just as it starts to stack the divs:
![enter image description here]()
Eventually you get this order, top down:
- col1
- col2
- col3
- col4
- cola
- colb
- colc
- cold
- col+