border-info class in Bootstrap 4


Use the border-info class in Bootstrap, to set a border that indicates information. Set the class as if you use any other class in Bootstrap:

<div class="one border border-info">
  Details
</div>

Above, we added border-info class. Another class, “one” is used to give shape to the div element −

.one {
  width: 180px;
  height: 180px;
  margin: 55px;
}

You can try to run the following code to implement the border-info class on a rectangle −

Example

Live Demo

<!DOCTYPE html>
<html>
  <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>
   <style>
   .one {
     width: 180px;
     height: 180px;
     margin: 55px;
   }
   </style>
  </head>
<body>

<div class="container">
  <p>Rectangle with a border to set information:</p>
  <div class="one border border-info">Details</div>
</div>

</body>
</html>

Updated on: 15-Jun-2020

121 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements