> For the complete documentation index, see [llms.txt](https://codennerd.gitbook.io/cxcss/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codennerd.gitbook.io/cxcss/product-guides/layout/position.md).

# Position

## `.absolute`

Sets the position property to `absolute`, positioning the element relative to its nearest positioned ancestor.

CSS equivalent: `position: absolute;`

Example usage:

```html
<div class="absolute">
  <!-- Content positioned absolutely -->
</div>
```

***

## `.relative`

Sets the position property to `relative`, positioning the element relative to its normal position.

CSS equivalent: `position: relative;`

Example usage:

```html
<div class="relative">
  <!-- Content positioned relatively -->
</div>
```

***

## `.fixed`

Sets the position property to `fixed`, positioning the element relative to the viewport.

CSS equivalent: `position: fixed;`

Example usage:

```html
<div class="fixed">
  <!-- Content positioned fixed -->
</div>
```

***

## `.static`

Sets the position property to `static`, placing the element in its default position according to the normal flow of the document.

CSS equivalent: `position: static;`

Example usage:

```html
<div class="static">
  <!-- Content with static position -->
</div>
```

***

## `.sticky`

Sets the position property to `sticky`, positioning the element based on the user's scroll position, but behaves like `relative` until it reaches a specified threshold.

CSS equivalent: `position: sticky;`

Example usage:

```html
<div class="sticky">
  <!-- Content with sticky position -->
</div>
```

***

These utility classes provide different positioning options for elements, allowing you to control their placement within the document layout.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://codennerd.gitbook.io/cxcss/product-guides/layout/position.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
