CSS position Property

The position property specifies the type of positioning method used for an element (static, relative, absolute, or fixed).

CSS top Property

The top property affects the vertical position of a positioned element. This property has no effect on non-positioned elements.

Right, bottom, and left properties have similar effects.

CSS z-index Property

The z-index property specifies the stack order of an element.

An element with greater stack order is always in front of an element with a lower stack order.

Note: z-index only works on positioned elements (position: absolute, position: relative, position: fixed).

Previous Section

5.1 Floating

Next Section

5.3 Display

<aside> ⚖️ Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License.

If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact [email protected] for inquiries.

</aside>