Jump to content

How do I position a form button to field side by side?

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Can you provide a working link to the page where you are attempting this?

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment

This usually works for two text boxes, but it will become more complex if you try to add further text boxes or checkbox fields. As an example, adding 

form { display: flex; } 

places the submit button on the same line but it then looks like this on a large screen.  

Adding Display Flex

As you will see, this isn't perfect and as the screen width is reduced, the layout will compress and become even less clear.

 

You could change the layout and checkbox so that it looks better, but this is much more complex and will require CSS and JavaScript to make it responsive on desktop and mobile.

Adding CSS and JS

Mobile

 

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

Link to comment
  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.