.container-fluid

Hello guys ! today we will learn about .container-fluid class in Bootstrap 4 !

The .container class is used for providing the fixed width container that is helpful for providing fixed width to whole .container-fluid !

Example :

PHP Example

Edit it yourself


<!DOCTYPE html>
<html lang="en">
<head>
  <title>Container-fluid Example</title>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.4/dist/jquery.slim.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js"></script>

</head>
<body>

<div class="container-fluid">
  <h1 style="background-color:gray;">.container-fluid</h1>
</div>

</body>
</html>