Custom Element pin to center on mobile screen

Hello, I have been working on a custom element that has a Mailchimp form (I am using the old editor, not editorX); I am using pin to bottom on the desktop version, but I can’t use the same for the mobile version. I have some posts saying that it is possible to pin the element on a mobile version with CSS; so I tried position: Absolute and Transform: Translate to position it at the center, but when I scroll the mobile screen, the element moves too. I know I am new to this and may not be doing this right. Could someone enlighten me? or give me an example? I have searched for examples, but I can’t find any. Thank you!!