"Responsive Column with Flexbox"
Bootstrap 4.1.1 Snippet by subhash4web

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="items"> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> <div class="item">Lorem Ipsum</div> </div>
.items { display: flex; flex-wrap: wrap; margin-left: -10px; margin-top: -10px; } .items .item { flex: 1 0 calc(25% - 10px); box-sizing: border-box; background: #5aa518; color: #ffffff; text-align:center; padding: 20px; margin-left: 10px; margin-top: 10px; }

Related: See More


Questions / Comments: