- Home
- /
- Tutorials
- /
- CSS Tutorial
- /
- CSS Position
CSS Layout
CSS Position
The CSS Position property is used to control how an element is positioned on a webpage.
By default, HTML elements are displayed according to the normal document flow. The position property allows you to move elements relative to their normal position, a parent element, or the browser window. The supporting concepts are explained in Anchor Positioning and CSS Z-index.
CSS Position is commonly used for:
- Navigation bars
- Popups and modals
- Sticky headers
- Tooltips
- Custom layouts
Syntax
CSS Position Syntax
css
selector {
position: value;
}