Pre-requisite: Bootstrap Cards
Bootstrap cards provide a flexible and extensible content container with multiple variants and options such as styling the Tables, stacking multiple images horizontally/vertically, making the stacked contents responsive, etc. Cards include so many options for customizing their backgrounds, borders, Header, footer, color, etc.
To show multiple horizontal images in Bootstrap card you need to clear the basics of Bootstrap Card, there is an easy way to do that task. Also, there is some pre-defined bootstrap code which will give a similar output after that you can easily modify that little bit with the help of CSS, those are
- grid markup
- Card groups
- Card decks
- Card columns
Example: This example inserts multiple images in Bootstrap card horizontally.
<!DOCTYPE html> <html lang="en"> <head> <title> How to show multiple horizontal images in Bootstrap card ? </title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href= <script src= </script> <script src= </script> <script src= </script> <style> img { max-width: 100%; max-height: 50%; padding-top:10px; } h1 { color: green; } </style> </head> <body> <h1 style="color:green;text-align:center;"> GeeksforGeeks </h1> <div class="container"> <div class="card-group"> <!--bootstrap card with 3 horizontal images--> <div class="row"> <div class="card col-md-4"> <img class="card-img-top" src= <div class="card-body"> <h3 class="card-title">Compare</h3> <p class="card-text">JavaScript | Python</p> </div> </div> <div class="card col-md-4"> <img class="card-img-top" src= <div class="card-body"> <h3 class="card-title text-primary">Placement</h3> <p class="card-text">Sudo Placement Course</p> </div> </div> <div class="card col-md-4"> <img class="card-img-top" src= <div class="card-body"> <h3 class="card-title">DSA</h3> <p class="card-text">DS & Algo Course</p> </div> </div> </div> </div> </div> </body> </html> |
Output:

Recommended Posts:
- How to use grid for images in bootstrap card ?
- Why card images use data-src (not src) for image in Bootstrap 4 ?
- How to Display Validation Message for Radio Buttons with Inline Images using Bootstrap 4 ?
- How to align images in card with dynamic title?
- Bootstrap 5 | Card
- How to display images in Angular2 ?
- How to use links on card-img-overlay class in Bootstrap 4 ?
- How to align buttons in Card footer in Bootstrap ?
- How to set horizontal aligned accordion in Bootstrap 4 ?
- How to make horizontal scrollable in a bootstrap row?
- How to design Responsive card-deck with fixed width in Bootstrap ?
- Bootstrap 4 | Images
- How to put images in a box without space using Bootstrap?
- Responsive images in Bootstrap with Examples
- How to set multiple background images using CSS?
- Display Property in Bootstrap with Examples
- How to change column to row on small display in Bootstrap 4 ?
- How to display bootstrap carousel with three post in each slide?
- How to Create a Bootstrap Spinner and Display on Screen till the data from the API loads ?
- Bootstrap (Part-4) | Vertical Forms, Horizontal Forms, Inline Forms
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

