Key Concepts

Review core concepts you need to learn to master this subject

CSS z-index property

//`element1` will overlap `element2` .element1 { position: absolute; z-index: 1; } .element2 { position: absolute; z-index: -1; }

The CSS z-index property specifies how far back or how far forward an element will appear on a web page when it overlaps other elements.

The z-index property uses integer values, which can be positive or negative values. The element with the highest z-index value will be at the foreground, while the element with the lowest z-index value will be at the back.

CSS Display and Positioning
Lesson 1 of 1

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo