Whenever you need to place on image on top of another you can do it in one of two ways:
1) Use absolute positioning
The slideshow should be contained within a wrapper element that has position:relative
, then the contents of the slideshow use position:absolute
. The layout will not be affected because the "absolute" elements are within, and relative to, the wrapper, not the rest of the page.
2) Use one image on top of an element that has a background image
You can make a slideshow easily this way:
- Set the background image to the first frame
- Fade-in the image (the second frame) which is on top of the background
- Set the background to the same image as the second frame
- Hide the second frame
- Swap the SRC of the second frame to the third image
- Repeat