• Resolved dalai2017

    (@dalai2017)


    Hello,

    I am very new to the wpforms plugin. We have created a basic form with wpforms here:https://dalaigroup.com/contact-us/

    I am unable to figure out the necessary code to center our table on the webpage. Can someone help identify the right css command and confirm where I may be able to place it in my WordPress theme? Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jared Atchison

    (@jaredatch)

    Are you wanting to center the white area and make it narrow inside that gray background OR are you wanting to center the fields _inside_ the white area?

    Thread Starter dalai2017

    (@dalai2017)

    Hi Jared,

    I’m trying to center the fields inside the white area, so they are in the middle of the page. How should I go about that?

    Plugin Author Jared Atchison

    (@jaredatch)

    Check out the CSS below (https://cl.ly/3o390q3l3Z0B)

    
    .wpforms-field-container {
    max-width: 200px !important;
    margin: 0 auto !important;
    }
    
    .wpforms-submit-container {
    text-align:center;
    }
    

    This will center the form fields and the submit button. You can adjust the 200px to however wide you want the fields to be. For this code to work, you will need to adjust the field sizes (under Advanced settings for each field) and set to Large, which makes the fields go 100% of the parent container.

    Thread Starter dalai2017

    (@dalai2017)

    Thank you, Jared! This has helped more than any other code we have tried. We may be considering a different plugin for contact forms over the next few days. Do you have any recommendations for a free plugin that works well creating contact forms? WPForms has been somewhat limiting, while prompting us to upgrade for more customization options.

    Thread Starter dalai2017

    (@dalai2017)

    One more question! When including this css code in my theme, what is the correct way to address one specific form? For example, the form ID for the link I’ve provided is [wpforms id=”15289″]. I see the code you provided applies to all forms created with the wpform plugin.

    Plugin Author Jared Atchison

    (@jaredatch)

    Sure, to target a specific contact form, just add the unique ID in front of those CSS rules. Example:

    
    #wpforms-15468 .wpforms-field-container {
    max-width: 200px !important;
    margin: 0 auto !important;
    }
    
    #wpforms-15468 .wpforms-submit-container {
    text-align:center;
    }
    
    Thread Starter dalai2017

    (@dalai2017)

    Thanks so much Jared!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Center wpform on webpage’ is closed to new replies.