Pin a button to the bottom of a form using absolute position

Use absolute position to pin elements in a specific place inside the boundaries of a relative parent element.

We’re transitioning to a new UI, and are in the process of updating our Webflow University content.

Absolute-position a submit button so that it’s pinned to the bottom of a form

To do that, first, we need to relatively position the form element. Because, If we absolute-position the submit button first, the button may jump to an unexpected location. So, to keep the button inside the form element, let’s set the form element’s position to relative:

  1. Select the form element
  2. Set its position to relative

And now, let’s position the button:

  1. Select the submit button inside the form
  2. Set the position to absolute
  3. Set the bottom, left and right values to 0px
  4. Set the width: 100%

You may notice the submit button might overlap other form elements now that it’s absolute positioned. If this happens, you can fix it by adding bottom padding on the form element to compensate for the submit button’s height.

Table of contents

Continue learning

Hmm…we couldn’t find any results for “search query”. Try a different search term or check out our community forum.

Search the forumReset the filter
Load more

Filter

Reset
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Topics
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Back to top