You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
3.3 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="index.css">
<title>Bootstrap Grid System</title>
</head>
<body class="text-center">
<h1> Bootstrap Grid System</h1>
<!-- Two Columns Start -->
<h2>Two Columns</h2>
<div class="container-fluid">
<h3>1:1 Ratio</h3>
<div class="text-light row">
<div class="bg-primary pt-3 pb-3 border border-dark col-6">6 Col</div>
<div class="bg-secondary pt-3 border border-dark col-6">6 Col</div>
</div>
<h3>1:2 Ratio</h3>
<div class="text-light row">
<div class="bg-primary pt-3 pb-3 border border-dark col-4">4 Col</div>
<div class="bg-secondary pt-3 pb-3 border border-dark col-8">8 Col</div>
</div>
<h3>1:3 Ratio</h3>
<div class="text-light row">
<div class="bg-primary pt-3 pb-3 border border-dark col-3">3 Col</div>
<div class="bg-secondary pt-3 pb-3 border border-dark col-9">9 Col</div>
</div>
<!-- Two Columns End -->
</div>
<!-- Three Columns Start -->
<h2>Three Columns</h2>
<div class="container-fluid">
<h3>1:1:1 Ratio</h3>
<div class="text-light row">
<div class="bg-primary pt-3 pb-3 border border-dark col-4">4 Col</div>
<div class="bg-primary pt-3 pb-3 border border-dark col-4">4 Col</div>
<div class="bg-primary pt-3 pb-3 border border-dark col-4">4 Col</div>
</div>
<!-- Row with three columns divided in an uneven ratio -->
<h3>Uneven Ratio</h3>
<div class="text-light row">
<div class="bg-primary pt-3 pb-3 border border-dark col-7">7 Col</div>
<div class="bg-primary pt-3 pb-3 border border-dark col-3">3 Col</div>
<div class="bg-primary pt-3 pb-3 border border-dark col-2">2 Col</div>
</div>
</div>
<!-- Three columns End -->
<!-- Automatic Sizing Start -->
<h2>Automatic Sizing</h2>
<div class="container-fluid">
<div class="text-light row">
<div class="bg-primary pt-3 pb-3 border border-dark col">Auto</div>
<div class="bg-secondary pt-3 pb-3 border border-dark col">Auto</div>
<div class="bg-primary pt-3 pb-3 border border-dark col">Auto</div>
<div class="bg-secondary pt-3 pb-3 border border-dark col">Auto</div>
<div class="bg-primary pt-3 pb-3 border border-dark col">Auto</div>
</div>
</div>
<!-- Bootstrap Script -->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<!-- End of Bootstrap Script -->
</body>
</html>