How to create footer for Bootstrap 4 card

BootstrapWeb DevelopmentCSS Framework

To create a footer in Bootstrap 4 card, use the card-footer class.

Set the footer −

<div class="card-footer">
  Footer message
</div>

The footer class comes after the card-body and card-header class, since the footer is always in the bottom as the footer of a web page. Here is the complete code −

<div class=”card”>
  <div class="card-header">Venue: 811, KY Road, New York</div>
  <div class="card-body">Timings: 9AM-11AM</div>
  <div class="card-footer">Reach before 9AM</div>
</div>

Let us see how to create card footer in Bootstrap 4 −

Example

Live Demo

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  </head>

<body>
  <div class="container">
    <h2>Church Worship</h2>
    <div class="card">
      <div class="card-header">Venue: 811, KY Road, New York</div>
      <div class="card-body">Timings: 9AM-11AM</div>
      <div class="card-footer">Reach before 9AM</div>
    </div>
  </div>

</body>
</html>
raja
Published on 10-Jul-2018 10:22:00
Advertisements