seb4222
seb4222

Reputation: 5

Push and Pull with SASS/Susy

I have a three divs layout and want to place them in one line:

Main | Aside | Box

main {@include span (8 of 17);
aside {@include span (4 at 9 of 17);
.box {@include span (2 at 13 of 17) @include pull(2);

I dont get the .box to leave space between itself and aside. With the code above the .box will be placed over main. Without the

@include pull(2)

it will be placed direct right. Any suggestions?

Upvotes: 0

Views: 1644

Answers (1)

Miriam Suzanne
Miriam Suzanne

Reputation: 14010

The pull mixin adds negative left margins to an element, pulling it to the left. The push mixin adds positive left margins, pushing it right. But in this case, you can just float the element right, which is what happens when you add the last keyword. What you want to do is span the last 3 columns out of 17, so in this case, you can just write that:

.box { @include span(last 3 of 17); }

see http://sassmeister.com/gist/c7c14a3ae4ef22d892a6

Upvotes: 1

Related Questions