Search code examples
sasssusy-compass

How do I float container to the left? [SUSY, Sass]


is it possible to float a susy container to the left – instead of having it centered.

If yes, how do I do that? A regular float:left messes up the grid.

Thanks.


Solution

  • Yes. You don't need to float. The centering happens simply by setting margin: auto on both the right and left. Change either of those margins, and the container will move. In your case: just add any non-auto margin-left. The value you use will be the offset from the left edge.

    // flush
    @include container;
    margin-left: 0;
    
    // offset
    @include container;
    margin-left: 1em;