Letting cards take up space with the .flex-wrap and .col classes
In this recipe, we will look at the power of applying helper classes to flex containers in combination with using the Flexbox grid on the flex items, in order to create a fully responsive Flexbox grid of Bootstrap components. This grid is very versatile and allows us to create wonderful responsive designs on the fly. Bootstrap now delivers even more on its promise of the fast layout of web pages with the simple use of predefined classes in its HTML markup. In this recipe, we will see how easy it is to set up a Flexbox-enabled layout.
Getting ready
To get started with the recipe, we will first inspect a completed recipe. Navigate to chapter8complete/app/
and run harp server
. Then, preview the completed recipe at localhost:9000/recipe08-02
. You should see a simple layout with eight card components, lined up in rows as per the available screen size.
If you resize the browser, you will be able to see that the cards always take up...