How it works…

In step 1 of this recipe, we added the HTML structure, which has two divs and a style tag in between. As usual, the first div has the class of container and holds the heading and a paragraph that succinctly explain the recipe.

Inside the style tag, we had a couple of CSS declarations, similar to the previous recipe. We set the min-width property on the col class and specified the behavior of img elements inside cards with the use of object-fit and object-position properties, as well as setting the max-height property on the image.

In the second div in step 1, we specified the wrapping fluid container with the background. Inside of this wrapping container, we have a regular container, and inside of it, we have a div with a class ...

Get Bootstrap 4 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.