# 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>

![](/files/qELq4iJprpCaQ6kQxzK9)

* 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>

![](/files/uF5yTux808xO0vVpmEki)

* 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: 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:

```
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>
```

The question should be specific, self-contained, and written in natural language.
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.
