Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I increase the row width in zurb Foundation?

I am learning Zurb foundation, and my question is that how can I increase the default width of the row in the framework.

Like a 960 grid system has 960 px. How can I increase the wish of row to maybe 1200px, so should I add a custom stylesheet?

like image 407
Marc Andre Jiacarrini Avatar asked Nov 10 '13 05:11

Marc Andre Jiacarrini


3 Answers

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.

like image 97
designerNProgrammer Avatar answered Oct 18 '22 13:10

designerNProgrammer


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.

like image 28
Danish Avatar answered Oct 18 '22 14:10

Danish


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);
like image 4
am_ Avatar answered Oct 18 '22 12:10

am_