CSS code to make the submit button full width

  • Mark_Bufi
    Asked on March 26, 2024 at 10:15 PM

    Having trouble making the button fullwidth, form not responding to default CSS

    Jotform Thread 13309101 Screenshot
  • Sigit JotForm Support
    Replied on March 27, 2024 at 12:41 AM

    Hi Mark,

    Thanks for reaching out to Jotform Support. I cloned your form and encountered the same issue. The button wasn't full width even though CSS code was applied. The problem lay with the padding and margin. Please replace the existing CSS code with the following code.

    .form-all {
      box-shadow : none !important;
    }

    .form-error-message {
      display : none;
    }

    .form-validation-error {
      box-shadow : none !important;
    }

    .form-line-error {
      background : none;
    }

    /* CSS code to set the submit button to be full width #13309101 */
    .submit-button {
     width: 100%;
    }

    .form-buttons-wrapper.form-buttons-auto.jsTest-button-wrapperField {
     padding-right: 0px;
     padding-left: 0px;
     margin-left: 0px;
     margin-right: 0px;
    }

    button#input_7 {
      margin-left: 0;
    }
    /* Code ends here. */

    This guide will show you how to do that. As shown in the screencast below:

    CSS code to make the submit button full width Image 1 Screenshot 20

    Give it a try and let us know if there's anything else we can do for you.

  • Mark_Bufi
    Replied on March 28, 2024 at 12:10 AM

    Hi Sigit, thanks for the response. That seems to have worked. Thank you.