relative absolute position
relative absolute position
HTML
<div class="box-set">
<figure class="box box-1">Box 1</figure>
<figure class="box box-2">Box 2</figure>
<figure class="box box-3">Box 3</figure>
<figure class="box box-4">Box 4</figure>
<figure class="extra-box box-5">Box 5</figure>
<figure class="extra-box box-6">Box 6</figure>
</div>
CSS
body {
color: #fff;
font: 600 14px/24px "Open Sans", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", Sans-Serif;
}
.box-set,
.box,
.extra-box {
border-radius: 6px;
}
.box-set {
background: #eaeaed;
height: 200px;
position: relative;
border:1px solid #bbb;
z-index:0;
}
.box {
background: #2db34a;
height: 80px;
line-height: 80px;
position: absolute;
text-align: center;
width: 80px;
}
.extra-box {
position: absolute;
background: #da4453;
text-align: center;
}
.box-1 {
top: 6%;
left: 20%;
}
.box-2 {
top: 0;
right: 0px;
}
.box-3 {
bottom: 0px;
right: 0px;
}
.box-4 {
bottom: 0;
}
.box-5 {
bottom:10px;
top:10px;
left:100px;
z-index:-1;
}
.box-6 {
left:10px;
right:10px;
bottom:20px;
background: orange;
z-index:-2;
}