Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the default width of container in MaterializeCSS?

The default width of container is set to 70% in MaterializeCSS:

The container class is not strictly part of the grid but is important in laying out content. It allows you to center your page content. The container class is set to ~70% of the window width. It helps you center and contain your page content. We use the container to contain our body content.

How could this be changed?

like image 349
B Faley Avatar asked Sep 17 '16 22:09

B Faley


1 Answers

Just override the property by making sure that your style is read by the browser after linking to, or importing materialize.css

You would need to copy and change these values:

.container {
  margin: 0 auto;
  max-width: 1280px;
  width: 90%;
}
@media only screen and (min-width: 601px) {
  .container {
    width: 85%;
  }
}
@media only screen and (min-width: 993px) {
  .container {
    width: 70%;
  }
}
like image 114
Marian Avatar answered Oct 15 '22 22:10

Marian