• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is there a way to change the y-position of a sticky element while and after scrolling?

Community Beginner ,
Mar 24, 2022 Mar 24, 2022

Copy link to clipboard

Copied

(1) I'd like to have the sticky element move to the halfway point of the screen while scrolling, because before scrolling, the sticky element is in an unusual y-position. Also, when scrolling all the way down, the sticky element clashes with the footer, which does not look good. (2) I'd like to have the sticky element stop before crashing into the footer.

0.png

The sticky element is boxed in blue. This is what it looks like before scrolling.

1.png

While scrolling, the sticky element is not exactly at the y-midpoint of the screen. I want to be able to move it a bit upward so that it's centered.

2.png

After scrolling all the way down, part of the sticky element is buried underneath the footer. I want to be able to move it upward so that it doesn't crash into the footer.

 

Any help is appreciated. Thank you so much!

Views

216

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 24, 2022 Mar 24, 2022

That workaround which Harshika mentioned only looks okay for elements with a smaller height and when the page is relatively tall. For something like your case I'm afraid it might not look very good. But there's no native support for sticky elements that change their fixed positioning, so that's pretty much all you can do right now.

Votes

Translate

Translate
Adobe Employee ,
Mar 24, 2022 Mar 24, 2022

Copy link to clipboard

Copied

Hi Shoobie,

 

Thank you for reaching out. I assume you're looking for the similar workflow mentioned here. If so, I would request you to please check the workaround suggested by our expert and let us know if that helps.

 

Thanks,

Harshika

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2022 Mar 24, 2022

Copy link to clipboard

Copied

LATEST

That workaround which Harshika mentioned only looks okay for elements with a smaller height and when the page is relatively tall. For something like your case I'm afraid it might not look very good. But there's no native support for sticky elements that change their fixed positioning, so that's pretty much all you can do right now.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines