A small change in CSS will help you achieve the same result with Bootstrap 4 with flex support: By default in Bootstrap 4, it changes the default properties of the well-known .row class to:
.row { display: flex; margin-right: -0.9375rem; margin-left: -0.9375rem; flex-wrap: wrap; }
i.e. why your structure was not the same as before, all you have to do is change its CSS to the previous one, like:
CSS
.wrapper { height: 20rem; display: flex; flex-flow: column; } .row { display: block; margin-right: -15px; margin-left: -15px; } .row:before, .row:after { content: " "; display: table; } .row:after { clear: both; }
Here updated JSFiddle
source share