Jump to content

Float Submit Button Next to a Form Field

Recommended Posts

Posted
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 - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

Posted
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 - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

  • 1 year later...
Posted
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

Posted
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 - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

Posted
On 12/20/2022 at 10:47 PM, Beyondspace said:

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

image.thumb.png.c6e218fddba4fe759bb0fe1cdfa99c07.png

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

Screenshot 2022-12-27 at 1.31.31 AM.png

Posted
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 - PDF Lightbox popup - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> No-code customisations for Squarespace

Posted
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!

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.