To ensure consistency in your layout across smaller devices, consider using .col-sm-*
instead of .col-md-*
. For medium screens, the size is ≥768px
, and for small screens, it is ≥576px
. Your choice may vary depending on your design preferences.
I have provided both solutions so you can maintain the layout for large devices or stack elements accordingly:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
</head>
<body>
<div class="container-fluid">
<div class="row border-bottom">
<div class="col-sm-2 d-none d-md-block" style="-ms-flex: 0 0 125px;flex: 0 0 125px;">
[logo image]
</div>
<div class="col-sm-8 d-md-block align-items-center justify-content-center">
<h5> [school name]</h5>
<p class="d-inline"> [city state]</p>
<div class="row d-none d-sm-flex">
<div class="col">Website</div>
<div class="col">Setting</div>
<div class="col">Size</div>
</div>
</div>
<div class="col-sm-2 align-items-center" style="border:1px solid plum">
<a class="btn btn-sm btn-collegeList align-items-center justify-content-center px-1 px-md-2"> profile</a>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
</head>
<body>
<div class="container-fluid">
<div class="row border-bottom">
<div class="col-sm-2 d-none d-md-block" style="-ms-flex: 0 0 125px;flex: 0 0 125px;">
[logo image]
</div>
<div class="col-sm-12 d-md-block align-items-center justify-content-center">
<h5> [school name]</h5>
<p class="d-inline"> [city state]</p>
<div class="row d-none d-sm-flex">
<div class="col">Website</div>
<div class="col">Setting</div>
<div class="col">Size</div>
</div>
</div>
<div class="col-sm-12 align-items-center" style="border:1px solid plum">
<a class="btn btn-sm btn-collegeList align-items-center justify-content-center px-1 px-md-2"> profile</a>
</div>
</div>
</body>
</html>
For more information on the Bootstrap Grid System, refer to Bootstrap Grid System.