ShapeYourPath
(current)
Run Code
Live Code Editor- Bootstrap 4 Horizontal 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, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <title>Bootstrap Horizontal Card</title> <style type="text/css"> img { width: 200px; height: 200px; } </style> </head> <body> <div class="container text-center mt-4"> <h1 class="text-center">Bootstrap Horizontal Card</h1> <p class="text-center">Bootstrap horizontal card places image and text content side-by-side. </p> <div class="row"> <div class="col-sm-8 offset-sm-2"> <div class="card"> <div class="row no-gutters"> <div class="col-sm-5 col-md-6 " style="background: #868e96;"> <img src="https://picsum.photos/id/1/200/300" class="card-img-top " alt="Horrizontal card image"> </div> <div class="col-sm-7 col-md-6"> <div class="card-body"> <h5 class="card-title">Photo</h5> <p class="card-text">This is random photo.</p> <a href="#" class="btn btn-primary stretched-link">More Info.</a> </div> </div> </div> <!--/col-sm-offset-2--> </div> <!--/row--> </div> <!--/container--> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> </body> </html>
Output :
Running