Wordpress Developer & Photographer
Wordpress Developer & Photographer

How-to Center Contact Form 7

Contact form 7 is one of my most trusted and used plugins when working with WordPress. In the age of microtransactions every internet industry has seemed to weaponize monetization. Every single app and utility has tweaked it’s format and hidden features behind paywalls. In such a day and age, a robust, regularly updated plugin is hard to come by.

Contact Form 7 is a gem. It just works. But it does lack intuitive styling options. In order to make your fields look nice you’ll probably need to pick up another plugin. In my case the fact that the fields are by default left aligned drives me crazy. Especially on mobile devices, there’s no reason not to center align your contact form.

Step 1. Download+install ‘Contact Form 7 Style’ plugin
Step 2. Paste this code into the CSS editor section of the Contact Form 7 Style

body .wpcf7-form.cf7-style {
 
    margin: 0 auto !important;
 
    width: 450px;
 
    display: block;
 
}