Skip to content Skip to sidebar Skip to footer

Overlap Images In Center [css]

I'm trying to overlap images in css. They are both aligned in the center but one is below the other one. I tried z-index'ing which is fine with position: absolute; but if I do that

Solution 1:

Try this. position: absolute;, top: 0;, left: 0; The the red div is semi-transparent to reveal the blue div below.

Now, if you want to center these in the middle of the page, <div class="container"> use css: margin: 0 auto;.

Link to example: jsFiddle

Solution 2:

Use on #phone and #dots elements these css attributes: position, z-index, top, and left.

Use position: absolute the upper layer, and the top and left to place the upper layer to the correct location. Use z-index to specify the layer, lower value is backer, bigger value is upper.

Post a Comment for "Overlap Images In Center [css]"