Skip to content

Instantly share code, notes, and snippets.

@jeffersonrpn
Last active September 1, 2020 12:47
Show Gist options
  • Save jeffersonrpn/35f3c614f104190f67b3f867dcff8f55 to your computer and use it in GitHub Desktop.
Save jeffersonrpn/35f3c614f104190f67b3f867dcff8f55 to your computer and use it in GitHub Desktop.
Define a classe container com limiares de largura para diferentes telas
.container {
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
@media (min-width: 576px) {
.container {
max-width: 540px;
}
}
@media (min-width: 768px) {
.container {
max-width: 720px;
}
}
@media (min-width: 992px) {
.container {
max-width: 960px;
}
}
@media (min-width: 1200px) {
.container {
max-width: 1140px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment