How can I increase the row width in zurb Foundation?
You don't have to use !important
. Just place your new CSS—say app.css
—below the foundation.css
and use the following:
.row {
max-width: .px;
}
You can also use another class and add this property so that it won’t conflict with the default row.
Override the max-width property of your .row class, and set it to the width you want.
.row {
max-width: ...px !important;
}
If you'r using SASS, search for grid variables in the documentation, where you'll find info on how to override row width, gutter width and more.
$row-width: em-calc(1000);
Better way is to go to the _settings.scss file of foundation in your project, check online if you don't have _settings.css file or if you don't know its location please. just open and find this
$row-width: rem-calc(980); //change up to what you want
and this upper value will generate row-width like below value i.e 61.25rem.
/* line 228, ../../bower_components/foundation/scss/foundation/components/_grid.scss */
.row {
margin: 0 auto;
max-width: 61.25rem;
width: 100%;
}
but now if you change that row-width from 980 to something like 1280, like below example
$row-width: rem-calc(1280);
then you can see below that my css is generated automatically with the new max-width
/* line 228, ../../bower_components/foundation/scss/foundation/components/_grid.scss */
.row {
margin: 0 auto;
max-width: 80rem;
width: 100%;
}
be careful with that settings because you can change the look and layout of whole website drastically.