Skip to content

CSS code snippet – How to put an element in front?

/* You must use the z-index property */

.element1 {
	z-index: 2;
}

.element2 {
	z-index: 1;
}

/* all elements with the element1 class will be in front of elements with element2 class */
See also  Python code snippet - How to change windows icon tkinter?

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.