Skip to content

Instantly share code, notes, and snippets.

@kushalseth
Last active October 10, 2020 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kushalseth/341bc3c833942d1e02da87fbb731127b to your computer and use it in GitHub Desktop.
Save kushalseth/341bc3c833942d1e02da87fbb731127b to your computer and use it in GitHub Desktop.
Difference between container and container-fluid
<div class="container">
<p> Conatiners: Are the one which have one fix width for each screen size.</p>
</div>
<div class="container-fluid">
<p> container-fluid: expands itself to fill full width </p>
</div>
<!--CSS used internally in bootstrap for container class -->
<style>
@media (min-width: 568px) {
.container {
width: 550px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container {
width: 1170px;
}
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment