[html] how to overlap two div in css?

I have two div likes ,

<div class="imageDiv"></div>
<div class="imageDiv"></div>

and css class ,

 .imageDiv
    {
        margin-left: 100px;
        background: #fff;
        display: block;
        width: 345px;
        height: 220px;
        padding: 10px;
        border-radius: 2px 2px 2px 2px;
        -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
        -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
    }

You can see the result Here :)

I want to overlap this two div likes ,

enter image description here

This question is related to html css

The answer is


check this fiddle , and if you want to move the overlapped div you set its position to absolute then change it's top and left values


I edited you fiddle you just need to add z-index to the front element and position it accordingly.


See demo here you need to introduce an additiona calss for second div

.overlap{
    top: -30px;
position: relative;
left: 30px;
}