I am working on a small web application and I want to display 5 columns with equal width that are responsive.
However, I only want this layout to be visible on devices with a width of ≥992px. For devices with a width <992px, I want the 5 HTML elements to be displayed in one full-width row.
Equal-width columns can be broken into multiple lines, but there was a known issue with a Safari flexbox bug that prevented this from functioning properly without specifying
flex-basis
orborder
.Two workarounds have been mentioned in a reduced test case outside Bootstrap, although it should not be required if the browser is up to date.
Source: https://getbootstrap.com/docs/4.0/layout/grid/
I am somewhat confused about how to achieve this desired responsive behavior using Bootstrap 4.
I have come up with an "idea," but I believe it might look unattractive. What do you think?
Let's consider this structure:
<div class="container">
<div class="row">
<div class="col">Column</div>
<div class="sep"></div>
<div class="col">Column</div>
<div class="sep"></div>
<div class="col">Column</div>
<div class="sep"></div>
<div class="col">Column</div>
</div>
</div>
Then, with jQuery, I can select .sep
and add the Bootstrap 4 class w-100
for widths less than 992px.
Thank you for reading and please excuse any mistakes in my English.