The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Centering Gravity Form on a WordPress Page! Reply To: Centering Gravity Form on a WordPress Page!


Hey there, I had a look at your site and did some fiddling with the Chrome developer tools and had some success.

Try wrapping the code inside the form in a div, set a class on it and add margin: 0 auto and text-align:center to that class and see how that goes.

You may wish to look into using media queries if you’re looking for further control over what happens at smaller screen-widths. There’s an article on them here

Hope that helps.

EDIT: In hindsight, you could probably get away with just setting “text-align:center” on your form tag for the functionality you’re looking for.