|
Answer» Display flex items in between on medium SCREEN USING the justify-content-md-between class in Bootstrap.
The following is an example: <!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.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container mt-3">
<h2>Example</h2>
<p>Note: RESIZE the browser window</p>
<div class="d-flex justify-content-md-between bg-primary mb-3">
<div class="p-2 bg-success">Flex Item 1</div>
<div class="p-2 bg-secondary">Flex Item 2</div>
<div class="p-2 bg-danger">Flex Item 3</div>
</div>
</div>
</div>
</body>
</html>The following output displays the flex items are visible in between the flex container on medium screen size:
|