Setting the position type to pinned
To change an element’s position, open the inspector panel and click the dropdown under Position type, then select Pinned.
Defining what the element is pinned to
To define where you want to pin an element, click the Pin to dropdown.
The options that will appear are dependent on whether the element’s parent is a container or a section.
Select one of the options to set your desired behavior:
Container: Make the element visible as visitors scroll through a specific container.
Section: Make the element visible as visitors scroll through a specific section.
Page: Make the element visible as visitors scroll up and down the page.
Depending on what your element is pinned to, it will behave differently in relation to how the user scrolls through your design.
If an element is pinned to the page, the position of that element will be set relative to the viewport, meaning the element will always be fixed in that position regardless of how the site sections scroll. You may be familiar with this position as the CSS property Fixed.
If an element is pinned to a parent section or container, the element’s position will be set relative to its parent. When an element is pinned to a section or a container, the element will only stay in place as a user scrolls through that section or container*.
Once its parent moves out of the viewport, the pinned element will move with it and will no longer be visible.
Note that pinned elements are not affected by parent overflow. For example, whether the overflow is set to hidden, scroll or show, the pinned element will still be displayed.
*To find out how to create scrollable containers visit our overflow article.
Changing from Pin to page to Pin to section
Click the Position type dropdown and choose one of the other options—Default or Sticky—to remove the existing Pinned position.
Then, click on the Position type dropdown again, choose Pinned and select Section under Pin to.
EXPLORE MORE TUTORIALS
Was this lesson helpful?
Thank you for your feedback!