Skip to main content
Question

How to create a scrolling section over a fixed section?


Sannah_Siddique

Hi!

I’m new to Figma & design - but trying to create an interaction on a prototype which involves two sections on one frame. One section would be fixed and is the top part of the frame, whilst the second section would allow me to scroll over the first section.

A reference of the same interaction can be found here on mobile view: [The Classic Check Cashmere Scarf in Mid Camel | Burberry® Official]

Sadly when I fix position when scrolling of the the top section of the frame, and set the second section to vertical scrolling it will scroll underneath the top section which is fixed on scroll.

Any help or advice would be greatly appreciated.

16 replies

Philip9
  • 1 reply
  • June 27, 2022

Have you found a solution for this?


Phil_Larsen
  • Active Member
  • 130 replies
  • June 27, 2022

When setting a layer to Fix Position When Scrolling, the layer will be above all other scrolling elements making any scrolling content appear beneath.

I created two variations on how you can get a result that might be more of what you’re looking for.

Here is a draft file you can see the difference:

Figma – 27 Jun 22

Melissa15
  • 1 reply
  • December 6, 2022

This is super helpful! Do you think the nested approach could be achieved with three cards?


@Phil_Larsen 's solution is super helpful, but what about use cases where you want there to be scrolling content both above and below a fixed element, without 2 different scrolling frames?

Modifying the order of fixed elements is easy enough via z-index and position:relative in code — I’m a little confused as to why Figma opted to set all the fixed layers forcefully at the top in the first place. Curious if there’s an existing feature request addressing this issue.


John_Kennedy_Saguban

This works if the “fixed” frame is just a plain color or image. But once you have buttons, text and anything else, when you toggle “fix position” it tends to be placed above everything else, so incoming frames from below when scrolling for example, those elements on the fixed frame shows in from of the incoming frame. I still can’t find solution for this one


Jarek_Marciniak

I’m joining the question. I don’t understand why fixed elements are forced to be above everything else. Doesn’t make any sense.


  • 1 reply
  • February 24, 2023

Hey guys, I’m from Taiwan. I think I find the way to resolve this issue.
In “Layer and Prototype Settings” video, you can check the relationships between all frames or other items.
In “Figma Prototype” video, yep! You’ll see the prototype that I made, and a shortcoming too 😂
Hope it’s helpful. And forgiving me for my poor English 😅


Hi! Did you find a solution for this? I tried to do that but I didnt find any tutorial or solution



It seems that you can do this now - Just set the layer to sticky, and it will stick based on the hierarchy the layer is in.


Christian_Martin1

Exactly. And scrolling over a plain background has the same effect as scrolling normally


Josef_Noah1

Did you found the solution ??


Josef_Noah1

i said did you find the solution


Just set the layer to sticky, and it will stick based on the hierarchy the layer is in. Put the layer in the section of the fixed layers and set the direction of the scroll. Worked for me.


I may have figured out a fix on this. I have no idea why it works because it doesn’t really make much sense and I accidentally stumbled upon it.

If you take the layer you want to scroll and move it above all other layers in the parent frame, it will say that it is “fixed”; however, if you look in the prototype bar, it will be labeled as “position: fixed, overflow: vertical”. This will allow the capability of having that layer scroll over fixed layers. You will have to play around with the exact placement of where it will scroll on the screen though by tweaking the frame vs the content within it, because that aspect of it really makes no sense to me either, but it works. Hope this helps.


Arnold Rodrigues
  1. create a frame and add your elements that you want fixed [ keep them as scroll with parent in prototype , open prototype tab and keep that frame as no scrolling in prototype. 
    1. additionally you can keep some components as fixed if you want the elements on top as the regular fixed 
  2. create another frame with the same dimensions as the previous, and add the elements that you want to scroll, now insert this scond frame within the first one which has the fixed elements, and add scroll with parent, but make sure there is atleast one element that overflows the second frame, so that it can scroll, not the frame itself [because the parent frame is set to no scrolling]

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings