Reputation: 1196
I want to position 2 div's. 150px | div width 440px | 100px | div width 440px | 150px . I don't know how to set it. I know it should be simple but this is my first project with susy
$susy: (
columns: 12,
math: fluid,
output: float,
last-flow: to
);
.rounded{
@include span(6);
border-radius: 2px;
background-color: rgb(246, 246, 246);
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.25);
position: relative;
//left: 150px;
top: 224px;
width: 440px;
height: 478px;
overflow-x:hidden;
overflow-y: scroll;
}
.rounded2 {
@include span(6);
border-radius: 2px;
background-color: rgb(246, 246, 246);
box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.25);
position: relative;
top: 224px;
width: 440px;
height: 478px;
overflow-x:hidden;
overflow-y: scroll;
}
<div class="newApp">
<h1>To do list</h1>
<div class="rounded">
<ul>
{{#each tasksToDo}}
{{>task}}
{{/each}}
</ul>
</div>
<h1>Done list</h1>
<div class="rounded2">
<ul>
{{#each taskDone}}
{{>done}}
{{/each}}
</ul>
</div>
</div>
<template name="done">
<li class="list_item">
<span class="text">{{title}}</span>
</li>
</template>
<template name="task">
<li class="list_item">
<span id="editingTask">{{> editableText collection="tasks" field="title"}}</span>
<br>
<button class="completed">Completed</button>
<button class="edit">Edit</button>
<button class="delete">Delete</button>
</li>
https://i.sstatic.net/oTQnZ.jpg
Here is html and pic
Upvotes: 0
Views: 53
Reputation: 14010
Your current code is overriding everything that susy would do for you. Susy sets a width, a float, and margins or padding (for gutters). Here's a sassmeister demonstration of one way to get your layout using Susy. There would be any number of other approaches, since Susy is essentially a calculator, and expects you to provide most of the opinions.
$susy: (
columns: 2,
column-width: 440px,
gutters: 100/440,
gutter-position: split,
);
.newApp {
padding: gutter()*2;
}
.rounded,
.rounded2 {
@include span(1);
}
Currently your h1
elements are in the way, though. You'll have to wrap them inside the layout blocks. That's just a problem with CSS floats.
Upvotes: 1