Skip to main content
Solved

[Beginner, help needed] Auto-layout bottom margin does not seem to work

  • January 3, 2023
  • 2 replies
  • 2574 views

Lasym

Hi !

I’m starting to use Figma more professionally (used it in a personal way before), and just learned about prototype, scrolling and so on

I’m trying to create a scrollable list of tickets. If the user does not find the ticket she wants in the list, she can click a text at the end that says “Load more tickets” (see image below, I can only embed one).

Unfortunately, I’m unable to put this bottom padding you see above when I enable the scrolling on the list container (an auto-layout element, no component involved). It appears like this :

How do I add this bottom layout? I’ve been searching for what feels like hours without finding what I need.

Thanks in advance for any help ! Have a nice day ☀️

Best answer by Osama_Turki

I have been facing this issue for a while and the reason behind it is that the scrolling is only concerned with the frame content and the padding of the autolayout frame is not considered as its content, but here are two workarounds:

  • Keep the autolayout Frame height as hug content, and introduce a parent frame with the desired height with the vertical scrolling applied to the parent frame.

  • Add a rectangle with a height of 0.001 ( this height will translate to zero -another hack that might be beneficial in the future-) at the bottom of the autolayout frame.

P.S. with the second approach the bottom padding will be the same value as the spacing between the elements.

View original

2 replies

Osama_Turki
  • Active Member
  • 42 replies
  • Answer
  • January 3, 2023

I have been facing this issue for a while and the reason behind it is that the scrolling is only concerned with the frame content and the padding of the autolayout frame is not considered as its content, but here are two workarounds:

  • Keep the autolayout Frame height as hug content, and introduce a parent frame with the desired height with the vertical scrolling applied to the parent frame.

  • Add a rectangle with a height of 0.001 ( this height will translate to zero -another hack that might be beneficial in the future-) at the bottom of the autolayout frame.

P.S. with the second approach the bottom padding will be the same value as the spacing between the elements.


Lasym
  • Author
  • 1 reply
  • January 3, 2023

It works thank you so much !


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