Jump to content

Float Submit Button Next to a Form Field

Recommended Posts

On 7/2/2021 at 8:35 PM, abcohen1605 said:

Site URL: https://fiberseal.squarespace.com

Is it possible to make a form field shorter and float the submit button next to it?  Trying to do this in my footer.

 

PW: orangedoor

try

@media only screen and (min-width: 640px) {
  #block-yui_3_17_2_1_1625230745440_16307 form {
      display: flex;
      align-items: center;
      width: 100%;
}
  #block-yui_3_17_2_1_1625230745440_16307 form .field-list {
    flex: calc(85% - 70px);
  }
  
  #block-yui_3_17_2_1_1625230745440_16307 form .form-button-wrapper {
    flex: 70px;
    text-align: right;
  }
  #block-yui_3_17_2_1_1625230745440_16307 form .form-button-wrapper input {
    flex: 70px;
    text-align: right;
    margin: 6px 0 4px;
  }
          
}
        

image.png.3dec6e9c3121b5a0614666ce4756df58.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
1 hour ago, michaell said:

I would love the same for https://www.danki.me/ . Appreciate your help!

 

This:

1401286280_Screenshot2021-07-12at13_27_06.png.d4154d8747e461a13f102811f2fb1f0d.png

Instead of this:

709052143_Screenshot2021-07-12at13_27_15.png.c8cdb69f19a8ba6129a79abdb685a2b0.png

First remove space on the right and make the form's column larger

@media only screen and (min-width: 640px) {
  #block-yui_3_17_2_1_1625560086694_5541 form {
      display: flex;
      align-items: center;
      width: 100%;
}
  #block-yui_3_17_2_1_1625560086694_5541 form .field-list {
    flex: calc(85% - 250px);
  }
  
  #block-yui_3_17_2_1_1625560086694_5541 form .form-button-wrapper {
    flex: 250px;
    text-align: right;
  }
  #block-yui_3_17_2_1_1625560086694_5541 form .form-button-wrapper input {
    flex: 70px;
    text-align: right;
    margin: 6px 0 4px;
  }
  #block-yui_3_17_2_1_1625560086694_5541 .form-wrapper .field-list .field {
    margin: 0;
  }       
  #block-yui_3_17_2_1_1625560086694_5541 [name="email"] {
    line-height: 3em;
  }
}

image.thumb.png.35dcff2fc1d4cd6ccd42e3a3326734c3.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
  • 1 year later...
On 7/4/2021 at 8:13 PM, Beyondspace said:

try

@media only screen and (min-width: 640px) {
  #block-yui_3_17_2_1_1625230745440_16307 form {
      display: flex;
      align-items: center;
      width: 100%;
}
  #block-yui_3_17_2_1_1625230745440_16307 form .field-list {
    flex: calc(85% - 70px);
  }
  
  #block-yui_3_17_2_1_1625230745440_16307 form .form-button-wrapper {
    flex: 70px;
    text-align: right;
  }
  #block-yui_3_17_2_1_1625230745440_16307 form .form-button-wrapper input {
    flex: 70px;
    text-align: right;
    margin: 6px 0 4px;
  }
          
}
        

Hi there! This worked great for my regular Form Blocks Is it possible to do this for a Newsletter Block as well? I've tried altering this code but no luck.

@Beyondspace @tuanphan

Link to comment
On 12/18/2022 at 3:32 PM, PatrickJ said:

Hi there! This worked great for my regular Form Blocks Is it possible to do this for a Newsletter Block as well? I've tried altering this code but no luck.

@Beyondspace @tuanphan

Can you share your URL with the protected password so I can take a look?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

I check that it works fine now. Have you figured it out?

image.thumb.png.c6e218fddba4fe759bb0fe1cdfa99c07.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
3 hours ago, PatrickJ said:

Oh! Still looking like this for me at most mobile device widths:

Screenshot 2022-12-27 at 1.31.31 AM.png

Try adding to Home > Design > Custom css

@media only screen and (max-width: 767px) {
  #block-2b6877fafb5f55d61849 .newsletter-form-body {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #block-2b6877fafb5f55d61849 .newsletter-form-body  .newsletter-form-fields-wrapper.form-fields {
    width: 70%;
  }
  #block-2b6877fafb5f55d61849 .newsletter-form-field-wrapper {
    width: 100%;
    min-width: unset
  }

  #block-2b6877fafb5f55d61849 .newsletter-form-field-element.field-element {
    width: 100%;
  }
}

Support me by pressing 👍  or marking as solution if this useful for you

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

My testing

image.thumb.png.48eef276007a21279e52f0a0b11df437.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 12/27/2022 at 5:03 AM, Beyondspace said:

Try adding to Home > Design > Custom css

@media only screen and (max-width: 767px) {
  #block-2b6877fafb5f55d61849 .newsletter-form-body {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #block-2b6877fafb5f55d61849 .newsletter-form-body  .newsletter-form-fields-wrapper.form-fields {
    width: 70%;
  }
  #block-2b6877fafb5f55d61849 .newsletter-form-field-wrapper {
    width: 100%;
    min-width: unset
  }

  #block-2b6877fafb5f55d61849 .newsletter-form-field-element.field-element {
    width: 100%;
  }
}

Support me by pressing 👍  or marking as solution if this useful for you

You're a champ! Works like a charm! Thanks so much!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.