ShapeYourPath
(current)
Run Code
Live Code Editor- Placing Image At The Bottom Of The Bootstrap 5 Card
Source Code
<!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"> <title>Placing Image At The Bottom Of The Bootstrap 5 Card</title> </head> <body> <h1 class="text-center">Bootstrap Card With Image</h1> <p class="text-justify text-center">Let us understand bootstrap card with image concept with the help of an example.</p> <div class="container"> <div class="row"> <div class="col-12 col-sm-8 offset-sm-2"> <div class="card" style="width:450px"> <div class="card-body"> <h4 class="card-title">Card Title</h4> <p class="card-text">Write card text here.</p> <a href="..." class="btn btn-primary">Get more info</a> </div> <img class="card-img-bootom img-fluid" src="https://picsum.photos/seed/picsum/200/150" alt="Card image" style="width:100%"> </div><!--/card--> </div><!--/offset-sm-2--> </div><!--/row--> </div><!--/container--> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"></script> </body> </html>
Output :
Running