Skip to main content
Solved

Given two rectangles side by side, how do I adjust the "middle column" of both at the same time?


pov_pie

I want to adjust the middle. So if I push the middle to the right, the red square get larger horizontally and red smaller and vice versa.

I tried selecting both and moving the middle but it doesn’t work.

Thanks.

Best answer by Stephane_Popout

I tried to make a working example here https://www.figma.com/file/RzGFzfYHTxkWai1MvQykOO/Untitled-(Copy)?type=design&node-id=1%3A2&t=QPl6kkm28CKhqr2o-1

  • I added a frame with autolayout around both rectangle and set its width to Fixed.
  • I set the green one width to Fill
  • Result: When I select the red rectangle & I can move its right border, then the green resize accordingly

View original
This topic has been closed for replies.

4 replies

Stephane_Popout

You can put them in an autolayout
And set one of the green rectangle width to “Fill”
When you will resize the red rectangle, the green will take the remaining space


pov_pie
  • Author
  • 3 replies
  • May 6, 2023

Hi Stephane, thanks. I tried it but I would like both extremes of both rectangles to keep in place and move just the middle between them. Would you mind taking a look here? Feel free to make any change. https://www.figma.com/file/HEPqxBBsvO0YJrVQSrxN2t/Untitled?type=design&node-id=0%3A1&t=RgGdIXIDcKXU8XJq-1


pov_pie
  • Author
  • 3 replies
  • May 6, 2023

Hi Stephane, thanks for the response. I tried it but it’s not the result I’m looking for. I would like both extremes of both rectangles to keep in place and move just the middle between them.
Would you mind taking a look here? Feel free to make any changes. 🙂

Figma – 6 May 23

Stephane_Popout

I tried to make a working example here https://www.figma.com/file/RzGFzfYHTxkWai1MvQykOO/Untitled-(Copy)?type=design&node-id=1%3A2&t=QPl6kkm28CKhqr2o-1

  • I added a frame with autolayout around both rectangle and set its width to Fixed.
  • I set the green one width to Fill
  • Result: When I select the red rectangle & I can move its right border, then the green resize accordingly


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