You are viewing limited content. For full access, please sign in.

Question

Question

Buttons on one line

asked on October 31, 2018

I have created additional buttons using HTML.  I would like to place these buttons in line with the Submit button but cannot figure out how to do so.  Please advise.  This is how it looks currently.

Forms Button.png
Forms Button.png (99.42 KB)
0 0

Answer

SELECTED ANSWER
replied on October 31, 2018

You could use a negative top and left margin in CSS to try and shift things around, but you would need to make sure the container doesn't cover the submit button.

Personally, I would add a "Submit" button to my custom HTML, then use JavaScript to hide the default submit button and attach an event to your custom button that triggers the click.

For example, something like this:

$(document).ready(function(){
  // Hide default submit button
  $('.Submit').hide();

  // Make clicking of the custom button trigger the click on the default button
  $('#customSubmit').click(function(){
      $('.Submit').click();
  });
});

The reason I like doing things this way is that I can just style my custom buttons without worrying about how to keep them in line with the default buttons; sometimes even switching between browsers can make the display slightly different so it can be a pain to keep them looking nice under all circumstances.

2 0

Replies

replied on November 1, 2018

You can try applying this class to any button you need on the same line:

.inLine {display: inline-block;}

^save this in your CSS section of the CSS and JavaScript tab. Use javaScript to .addClass. So it would be something like:

$('.Submit, .OtherButtonClass').addClass('inLine');

^swap out "OtherButtonClass" with a class from your other button. Good luck!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.