Skip to main content
Solved

Aligning absolutely positioned objects - Tooltip / Infotip help needed!


Caitlin_Alexander

Hello! We’re loving the absolute positioning functionality of Autolayout. We’ve created a component for an infotip that has a nested component for the info box itself. When hovering the info icon, the black info box should appear.

Problem is, we need the bottom of the box and the bottom of the icon to stay aligned no matter how big the box gets. Without absolute positioning, this is easy. With absolute positioning, I haven’t been able to figure it out!

Any ideas?

Figma – 6 Jun 23

Best answer by Caitlin_Alexander

Thank so much! Using the autolayout alignment wasn’t working, but I just solved it -

It required a combination of setting the infobox’s constaints to left/bottom, AND setting it to have a -32Y to clear the icon height. Works a charm! Viewable in the figma link I included above in case anyone finds this thread and needs it 🙂

View original
This topic has been closed for comments

5 replies

tank666
  • 4863 replies
  • June 6, 2023

Just align the tooltip layer with absolute position to the bottom.


Caitlin_Alexander

Thank so much! Using the autolayout alignment wasn’t working, but I just solved it -

It required a combination of setting the infobox’s constaints to left/bottom, AND setting it to have a -32Y to clear the icon height. Works a charm! Viewable in the figma link I included above in case anyone finds this thread and needs it 🙂


Caitlin_Alexander


These were the pieces we needed.


tank666
  • 4863 replies
  • June 6, 2023

  • 0 replies
  • July 6, 2023

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


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