# layout with margin

{% tabs %}
{% tab title="codepen" %}
{% embed url="https://codepen.io/lochiwei/pen/JjJPjWm" %}


{% endtab %}

{% tab title="CSS" %}
```css
div {
    width: 100px;
    height: 50px;
    box-sizing: border-box;
    border: 1px solid black;
    background-color: #e66;
}

.div2, .div5 {
    background-color: #6e6;
}

.div3, .div6 {
    background-color: #66e;
}

.div2 {
    margin-left: 100px;
}

.div3 {
    margin-left: 200px;
}

.div5 {
    position: relative;
    left: 100px;
}

.div6 {
    position: relative;
    left: 200px;
}
```
{% endtab %}
{% endtabs %}
