Agyan
adda
Run
Reset
Copy
Bootstrap Tutorial › Bootstrap Containers › container vs container-fluid
Back to tutorial
Code
Edit, then press Run or Ctrl+Enter
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"> <div class="container bg-primary text-white p-3 my-2">.container – fixed width, centred</div> <div class="container-fluid bg-success text-white p-3 my-2">.container-fluid – full width</div> <div class="container-md bg-warning p-3 my-2">.container-md – full width below 768px</div>
Result