If you find yourself in a situation where two images are overlapping each other, but the one you want on top is currently on the bottom, add the following code in your CSS:

1
2
position: relative;
z-index: 5;

This code has to be applied to where both images are being called. For example, you would put z-index: 5; for the first one and z-index: 4; for the second image. The higher z-index number will be on top. This works great for overlaying transparent images over banners and such.


Share Button

One Response to WordPress: How To Layer Images Using CSS

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Categories

Impact
Search & Win

Link To Me

If you find anything useful, please