The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › [Solved] Fluid grid system
I was snooping a bit on bootstrap just to see have they structured code , and I can’t understand why they give a .row class a margin on left and right of -15px? Can anyone explain me that a little ?
I don’t know what the rest of the code looks like, but I’d imagine it’s to account for the extra 15px of margin between the grid items so that the items go to the left/right edges of their parent.
I made a demo http://codepen.io/anon/pen/Exysn
It make the row container somehow wider because of that negative margin.
I just trying to realize why they did it in this way with negative margins :)
Here’s a possible use case: http://codepen.io/ggilmore/pen/5581158173e956ac6f90a8ceb8eb2491
That’s it , now it’s a lot clearer what’s going on.Thanks