Closed dcolumbus closed 7 years ago
That margin shouldn’t be there if the .unit
is the first child of your .grid
row, so my first instinct would be to check that you’re using separate .grid
s for each horizontal row (i.e. instead of having all of the fields in your screenshot within a single .grid
). Can you share what the markup is you’re using to implement your screenshot, perhaps in a gist?
I'm using one grid DIV to house the three one-third units: https://gist.github.com/dcolumbus/d022f31f8b8e28c83b9f#file-gistfile1-txt
Thanks for the Gist. I’ve had a bit of a play, and I can’t seem to replicate the issue from your screenshot. Here’s a link to a demo on CodePen with gridism.css
included in the <head>
, and markup as you describe: http://codepen.io/cobyism/pen/eNxMoQ?editors=110
I also note that at the top of your issue description, you pasted some CSS containing:
margin-left: 2.564102564102564%;
… which seems odd to me because if you search through the current gridism.css
file, the only values ever specified for margin
are margin: 0 auto;
. All other spacing is done using padding
attributes.
Are you sure there’s nothing else in your site’s CSS providing that extra margin
?
I'm trying to use the "one-third" class, but there seems to be a margin-left rule that messes it up. When I turn off the rule, the grid responds the way it should:
With "margin-left" left in tact:
When the "margin-left" is turned off: