You can use the utilities mentioned above on the image (you can add a shadow, for example) and you can use the text utilities for the caption (to center, style it, etc). Using CSS background images as slide show with Ken Burns effect In this tutorial, the Ken Burns effect, which is basically used with still images for panning and zooming, is created with pure CSS. If you want to add text over an image, you can do this by making use of the card classes from Bootstrap 4. .square2 {background-image: url (favicon.png); background-size: 300px; width: 300px; height: 300px; border: 2px solid; text-shadow: white 0px 0px 2px; font-size: 16px;} As you can see, the CSS is actually essentially identical, save the name of the image file. Found inside – Page 457... formatting text for, 102-104 formatting CSS, formatting properties, 55-56 style sheets text color, 48 text size, 53 text ... 197-199 vertical alignment, 199-201 animated graphics, 189-190 backgrounds background-image style property, ... Found inside – Page 678background images adding to links (tutorial), 305–306 background-image property, 231–233 background-position property. ... 35 bolding/italicizing text, 156–157 bold/italic variants (web fonts), 135–141 Bootstrap CSS framework, ... Found inside – Page 682The .card-text class makes sure that the last child element doesn't have any bottom margin. Then, we have two links with the .card-link ... Bootstrap 4 also provides a few classes that add a background color and border color to cards. Bootstrap 4 Image Overlays Adding text over an image. I prefer to add classes instead of overwriting the default Bootstrap classes. Found inside – Page 144After learning the basics of Bootstrap and choosing icons from the Font Awesome library, you can start putting everything ... The background image pier.png is used in the banner in header.leaf: