Semantic-ui: why the grid's margin = -1rem

Created on 29 Nov 2014  路  2Comments  路  Source: Semantic-Org/Semantic-UI

when I use grid in my page
the horizontal scrollbar always appear
it make the page get wider than window.width
I find that the margin in css
f7n_irptgk ja 6 v f3s3
I can't understand why set margin a negative value?

Discussion

Most helpful comment

Use a padded grid vertically padded or horizontally padded grid variation that preserve the padding on first and last columns.

Grids sit flush with surrounding content by default. Negative margins on the outer grid counteract the spacing between all column. There's no way to adjust padding for first and last columns instead of using negative margins except to add row demarcations.

Notes on negative margins are in the docs, in the grid overview

All 2 comments

Use a padded grid vertically padded or horizontally padded grid variation that preserve the padding on first and last columns.

Grids sit flush with surrounding content by default. Negative margins on the outer grid counteract the spacing between all column. There's no way to adjust padding for first and last columns instead of using negative margins except to add row demarcations.

Notes on negative margins are in the docs, in the grid overview

@jlukic thank,
I missed that content in the docs
I should check the docs carefully = =~

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vinhtq picture vinhtq  路  3Comments

miguelmota picture miguelmota  路  3Comments

batata004 picture batata004  路  3Comments

ghost picture ghost  路  3Comments

iPaoo picture iPaoo  路  3Comments