PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Centering a form

  1. Hi guys,

    I'm trying to center a form within the page. I am using the form within the easy pagination shortcode. You can have a look here. http://clients.zerozendesign.com/galileo1/?page_id=299&preview=true

    What CSS should I use to accomplish this? The code can be added to the header of the form to override default?

    Posted 14 years ago on Friday September 2, 2011 | Permalink
  2. Until the form is published we won't be able to see it.

    However, to center a form on the page, target the .gform_wrapper.

    [css]
    body .gform_wrapper {
        width:450px;
        margin:0 auto;
        background:yellow;
    }

    That will make it narrow and yellow as well, so remove those lines once you see what you are actually targeting. The key here is the margin: top and bottom, zero, left and right, auto, which will center the div horizontally.

    You can find more examples of CSS targeting here:
    http://www.gravityhelp.com/documentation/page/CSS_Targeting_Samples#Form_Wrapper

    Posted 14 years ago on Friday September 2, 2011 | Permalink