I'm currently working on creating a CSS design template.
Within this project, I have two images named imageOne
and imageTwo
.
Both images are styled with position: relative
, as setting one to position: absolute
would compromise the responsiveness of the layout, which is essential in this context.
My goal is to position imageTwo
on top of imageOne
. How can I achieve this without affecting the responsive features provided by Twitter Bootstrap?
Below you can find the relevant code snippet. For a live demo, you can visit the jsfiddle link here.
<div class="imageOne image"></div>
<div class="imageTwo image"></div>
CSS
.image {
position: relative;
width: 100px;
height: 100px;
border: 1px solid red;
}
.imageOne {
z-index: 0;
}
.imageTwo {
z-index: 1;
}