Position

Published Aug 9, 2021Updated Sep 9, 2021
Contribute to Docs

Positioning in CSS provides designers and developers options for positioning HTML elements on a web page.

The CSS position can be set to static, relative, absolute, or fixed or sticky.

Position

bottom
Specifies the distance of an element from the bottom of the specified position.
left
Specifies the distance of an element from the left of the specified position.
position
Defines how elements are placed within the document.
right
Specifies the distance of an element from the right of the specified position.
top
Specifies the distance of an element from the top of the specified position.
z-index
Sets the stack order of an element.

All contributors

Looking to contribute?

Learn CSS on Codecademy