> For the complete documentation index, see [llms.txt](https://docs.abtasty.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abtasty.com/web-experimentation-and-personalization/editors-and-widget/list-of-widgets/ab-tasty-prebuilt-widgets/sticky-element-widget.md).

# Sticky Element Widget

The Sticky Element widget is part of the **Special** widget category. For more information on the widgets, please refer to [Widgets configuration in the visual editor](/web-experimentation-and-personalization/editors-and-widget/list-of-widgets/widgets-configuration-in-the-visual-editor.md).

## Introduction <a href="#h_01j67f6enzrn1f06vp6y93sfhp" id="h_01j67f6enzrn1f06vp6y93sfhp"></a>

The Sticky Element widget helps you keep important elements in the viewport of your visitors. This limits confusion and reminds them of the main expected task for each page.

For example, on product pages, it can be the "Add to Cart" button, on travel websites, the "Book Now" button, on SaaS apps, the "Save" button, and so on.

## Configuration <a href="#h_01j67p0nt36d2zzn1gzz2drtfm" id="h_01j67p0nt36d2zzn1gzz2drtfm"></a>

### Content tab <a href="#id-01gndd6ke8jb106cpcf5t3ptz5" id="id-01gndd6ke8jb106cpcf5t3ptz5"></a>

<img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-d547a611b44253b996a192d2d47f567db389fff1%2F5b7e70f61480325d515614c3e01a4352.png?alt=media" alt="" width="298">

* The "Select the Element to Stick" input allows you to select the link, button, or whole \<div> that you want to make "sticky".
* The "Foreground" toggler is toggled by default. When toggled, it allows you to change the z-index. value.
* The "z-index" number input lets you define the z-index value in order to position your sticky element among other elements already placed on the z-axis.

### Style tab <a href="#id-01gndd6ke90k3h7h5xczaw0nec" id="id-01gndd6ke90k3h7h5xczaw0nec"></a>

<img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-50aab06cf08ed6beecb65f4723248e72cd87b3cf%2F2e92dcb30f4a23f4ad18460851115a8b.png?alt=media" alt="" width="298">

* The "Sticky Position from Top" input number and unit select allow you to define the scroll height before the widget starts to become "sticky".
* If the "Add Background Color" check box is ticked, then you can define a "Background color" for the selected element in the color picker.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.abtasty.com/web-experimentation-and-personalization/editors-and-widget/list-of-widgets/ab-tasty-prebuilt-widgets/sticky-element-widget.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
