0

I have 3 divs in a row and then again 3 divs in another row like a grid.

I want to overlap div#4 on div#1,

Over lay design

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100

1 Answers1

0

You can try with one div having position absolute and other with position relative.

<div class="gray">

    <div class="blue">


    </div>
</div> 
.gray {
    background-color: #818181;

    height: 220px;
    width: 300px;
    position: absolute;
    overflow: hidden;
}

.blue {
    background-color: #0090ff;
    top: 0;
    height: 200px;
    width: 180px;

    position: relative;
    float:left;
    margin-left: 30px;
    margin-top: 10px;
}
Sumit Sinha
  • 189
  • 1
  • 2
  • 12
  • 1
    To what point? Which value should be applied to which div? They're numbered, what div should be absolute and which should be relative? What position to give the parent? – dakab Feb 21 '17 at 13:11