How to create footer for Bootstrap 4 card


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>

Updated on: 16-Jun-2020

197 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements