Skip to main content
June 18, 2024
Question

Button does not align to the right

  • June 18, 2024
  • 5 replies
  • 243 views

I have created a component in which a button is to be right-aligned on klick. No matter what I do, it remains left-aligned.

This topic has been closed for replies.

5 replies

Marian_Brchan
June 18, 2024

It depends on the contex of your design but this is the kind of setting you need to apply to the component instance and not the main component itself.

June 18, 2024

image

Unfortunately, this has no effect. The button should be directly next to the cookie banner when collapsed.

Pavel_Kiselev
Power Member
June 18, 2024

Yeah, you definitely need to look deeper at constrains and auto layout settings. Seems like right now you simply don’t understand those concepts

Marian_Brchan
June 18, 2024

As Pavel said, you need to use auto layout.
E.g. http://clippp.co/sharex/nXKto3glLU.mp4

June 19, 2024

Thank you for your tips. I haven’t quite figured out how the autolayout works, but I have managed to get the effect right.