Skip to main content
Question

Hover effect (prototype mode) change elemetn X position


Carlos_Viciana_Martinez

Hello!

I’m creating a hover effect on a Pause medium but when I hover over the element it changes the status (all good) but it also changes the X position of the element so it’s not working as intended (it should remain centered). It might be something simple but I can’t find the solution.

Issue:

I can’t upload more images or a small gif as Im new in the chat.

Hope someone can help, thanks in advance!

This topic has been closed for comments

3 replies

Haroll
  • Active Member
  • 273 replies
  • August 9, 2023

Hi @Carlos_Viciana_Martinez

You may want to look into Auto layout. It will help you align everything in the middle regarding their width

  1. Group all of your buttons (pause, load, settings and credits) in a frame (F)
  2. Turn that frame into an auto-layout (Shift+A)
  3. On the right panel you’ll find a section called “Auto layout” from there you can align the frame’s children to center
    image

if you don’t want to use Auto layout:

  1. Select all of your buttons
  2. Check on the right panel you’ll find a section called “Constraint”.
  3. From there, click on the first option and choose center

Hope it helps


Carlos_Viciana_Martinez

Thanks! I was able to solve it using constraints, regards! 🙂


ksn
Figmate
  • Community Support
  • 1611 replies
  • August 14, 2023

Thank you both @Haroll @Carlos_Viciana_Martinez

Gonna close this topic, but it will be available to anyone else who may have a similar question 😃 If anything else comes up, please feel free to open a new topic.


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