I am currently using Bootstrap 5.3. I want to use container-md class (for container to take full width [like container fluid] for screens whose size is less than md and for those screen whose size is greater than md, i want it be like normal container]. But it is not working as expected].
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
crossorigin="anonymous"
>
<title>Hello, world!</title>
</head>
<body>
<div class="container-md border">container</div>
<h1>Hello, world!</h1>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy" crossorigin="anonymous"></script>
</body>
</html>
What do i need to do to make container-md work? I checked if all script tags are there or not and I tried opening it in multiple browsers and updated browsers as well, but ntg worked.
Sighakolli Susmitha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.