What is z-index?
Using the CSS z-index
property, you can manipulate vertical stacking for overlapping elements:
Note: if you worry about
z-index
not working, make sure to only use it for elements which have their position value defined asstatic
.
Pros Main Features
- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable
Pros Main Features
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion
Pros Main Features
- A wide range of learning programs
- University-level courses
- Easy to navigate
- Verified certificates
- Free learning track available
- University-level courses
- Suitable for enterprises
- Verified certificates of completion
CSS z-index property syntax
To define the z-index
for an element, you need to specify one value:
z-index: value;
The default value is auto
, which means the stacking level depends on the parent container.
To define a custom level, use a unitless number. Elements with higher values will cover the ones with smaller values.
Browser support
Chrome
1+
Edge
12+
Firefox
1+
IE
4+
Opera
4+
Safari
1+
Mobile browser support
Chrome
18+
Firefox
4+
Opera
All
Safari
All