Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
octaviorojas

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

Question

I'm trying to figure out how get a form button to lay side by side on a field.

I've used this code to get the fields side by side...

But haven't been able to place the button on the right, side by side of the last field.

Thanks in advance!

 

I hope @paul2009 could see this, as he answered the original thread.

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

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


If a response has helped you, please give thanks using the  like-20-mag.png.3997345d620e40b4760b5d7a667cad54.png button.
Need personalised help? I'm a professional Developer who works with Designers internationally. You can book me via my company's website. www.sf.digital

Share this post


Link to post
  • 0

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

 


If a response has helped you, please give thanks using the  like-20-mag.png.3997345d620e40b4760b5d7a667cad54.png button.
Need personalised help? I'm a professional Developer who works with Designers internationally. You can book me via my company's website. www.sf.digital

Share this post


Link to post

Create an account or sign in to comment

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


×
×
  • Create New...