How to carefully create double-layered elements so that they are under each other, the upper and lower layers. And then I do, they are shifted. Manually all chtoli plant? I think there is an easy way.
1 answer
To be honest I did not understand the question a little.
- Try to create a parent element (section in my example) with the property position: relative;
- In it, place 2 (or as many as you want) elements with position: absolute; coordinates: top: 0px; left: 0px; and various indices (z-index)
It should look something like this: http://jsfiddle.net/gpVrJ/
section { position: relative; display: inline-block; width: 200px; height: 200px; border: 1px dashed black; } div { position: absolute; width: 200px; height: 200px; opacity: .5; } #first { height: 100px; background: #f00; z-index: 10; } #second { background: #0f0; z-index: 20; } <section> <div id="first"></div> <div id="second"></div> </section> |