The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Trouble with simple grid

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #41975
    Nathan Gross

    I’m trying to figure out how to create a simple grid similar to Chris Coyier’s “Don’t Overthink it Grid” but I seem to be missing something. My boxes are 25%. Why don’t the 4 boxes fit across the parent container? 25%+25%+25%+25% = 100%, no?

    It appears to have to do with the margin but I thought this resolved that:

    `* {
    @include box-sizing(border-box);

    Nathan Gross

    Ah, got it. I didn’t realize border box didn’t affect margin. It makes sense now that I think about it. Thanks ChrisP. Pen is updated.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.