Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap Card Sizing</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="m-4"> <div class="container-fluid"> <!-- Card sizing using grid markup --> <div class="row mb-4"> <div class="col-sm-6"> <div class="card"> <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">Some dummy text to make up the card's content. You can replace it anytime.</p> <a href="#" class="btn btn-primary">Know more</a> </div> </div> </div> <div class="col-sm-6"> <div class="card"> <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">Some dummy text to make up the card's content. You can replace it anytime.</p> <a href="#" class="btn btn-primary">Know more</a> </div> </div> </div> </div> <!-- Card sizing using sizing utility classes --> <div class="card w-75 mb-4"> <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">Some dummy text to make up the card's content. You can replace it anytime.</p> <a href="#" class="btn btn-primary">Know more</a> </div> </div> <!-- Card sizing using sizing utility classes --> <div class="card" style="width: 15rem;"> <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">Some dummy text to make up the card's content. You can replace it anytime.</p> <a href="#" class="btn btn-primary">Know more</a> </div> </div> </div> </div> </body> </html>