How to Style Your Contact Form 7 Submit Button with Custom CSS
Content
One of the most common questions from Contact Form 7 users is how to customize the appearance of the submit button. Whether you want to change its color, size, add a border, or fix it when it's not showing up correctly, the solution almost always involves adding custom CSS to your site.
Why Styling Isn't Built Into Contact Form 7
Contact Form 7 is designed to be a lightweight, functional form plugin. By default, it outputs minimal HTML and relies on your WordPress theme to provide the styling. This is why your form's appearance can change drastically between different themes or even different pages using the same theme. The plugin itself does not include a visual style editor; customization is done through CSS.
Common Submit Button Issues and Solutions
1. The Submit Button is Missing or Not Visible
As seen in the sample threads, a theme or other plugin's CSS can sometimes hide the submit button. A common fix is to ensure the button's display property is not set to 'none'.
.wpcf7-form-control.wpcf7-submit {
display: block !important;
}
If switching to a default WordPress theme (like Twenty Twenty-Four) makes the button appear, the conflict is with your main theme's stylesheet.
2. Changing the Button's Color, Size, and Font
To style the button, you need to target it with the correct CSS selector. The most reliable selector is input.wpcf7-submit or .wpcf7-form-control.wpcf7-submit.
input.wpcf7-submit {
background-color: #d59541 !important; /* Your desired color */
color: #fff !important;
border: none !important;
padding: 12px 24px !important; /* Controls the size */
font-size: 16px !important;
border-radius: 4px !important;
cursor: pointer !important;
font-family: "Your Font", sans-serif !important; /* Change the font */
}
3. Styling the Hover State
To change the button's color when a user hovers their cursor over it, add a :hover pseudo-class.
input.wpcf7-submit:hover {
background-color: #b37a30 !important; /* A darker shade for hover */
}
4. Adding Spacing Around the Button
If the <br> tag isn't creating space before your button, use CSS margins instead.
input.wpcf7-submit {
margin-top: 20px !important;
}
How to Add This CSS to Your Website
- In your WordPress dashboard, navigate to Appearance > Customize.
- Look for a section called Additional CSS or Custom CSS.
- Paste your custom CSS code into the provided box.
- Publish the changes.
Important Troubleshooting Tip
If your CSS changes aren't taking effect, it's likely because your theme's styles are more specific. Using the !important declaration (as shown in the examples) can often override these styles. For more complex issues, use your browser's inspector tool (right-click on the button and select 'Inspect') to identify the exact CSS rules being applied by your theme.
For more general information on styling forms, the Contact Form 7 team suggests reviewing their documentation on styling contact forms.
Related Support Threads Support
-
Trying to customise the submit button CF7https://wordpress.org/support/topic/trying-to-customise-the-submit-button-cf7/
-
Configuração de formuláriohttps://wordpress.org/support/topic/configuracao-de-formulario/
-
How to change Linked In icon settingshttps://wordpress.org/support/topic/how-to-change-linked-in-icon-settings/
-
change data and telephone number of the contact formhttps://wordpress.org/support/topic/change-data-and-telephone-number-of-the-contact-form/
-
Add iconshttps://wordpress.org/support/topic/add-icons-11/
-
Acceptancebox wrong appearencehttps://wordpress.org/support/topic/acceptancebox-wrong-appearence/
-
Issue with message showed after sendhttps://wordpress.org/support/topic/issue-with-message-showed-after-send/
-
How to customize “send” button ?https://wordpress.org/support/topic/how-to-customize-send-button/
-
Editing form for inputhttps://wordpress.org/support/topic/editing-form-for-input/
-
Editing the “include_blank” texthttps://wordpress.org/support/topic/editing-the-include_blank-text/
-
How to add Pay Pal to the formhttps://wordpress.org/support/topic/how-to-add-pay-pal-to-the-form/
-
How i can change the style in file buttonhttps://wordpress.org/support/topic/how-i-can-change-the-style-in-file-button/
-
Inline Submit Button Full Width on Mobilehttps://wordpress.org/support/topic/inline-submit-button-full-width-on-mobile/
-
Adding Conversion snippet to contactform 7https://wordpress.org/support/topic/adding-conversion-snippet-to-contactform-7/
-
Text, email and textarea size is different for different pageshttps://wordpress.org/support/topic/text-email-and-textarea-size-is-different-for-different-pages/
-
Link in acceptance checkboxhttps://wordpress.org/support/topic/link-in-acceptance-checkbox/
-
Edit contact formhttps://wordpress.org/support/topic/edit-contact-form-2/
-
Submit Button Sizehttps://wordpress.org/support/topic/submit-button-size-3/
-
Changing Contact Form Submit Buttonhttps://wordpress.org/support/topic/changing-contact-form-submit-button/
-
Form Update does not reflect on site.https://wordpress.org/support/topic/form-update-does-not-reflect-on-site/
-
Give better option CSS without prohttps://wordpress.org/support/topic/give-better-option-css-without-pro/
-
Checkbox SMS disclaimerhttps://wordpress.org/support/topic/checkbox-sms-disclaimer/
-
Change Languagehttps://wordpress.org/support/topic/change-language-263/
-
How change the default form text?https://wordpress.org/support/topic/how-change-the-default-form-text/
-
add a link to a page in the contact formhttps://wordpress.org/support/topic/add-a-link-to-a-page-in-the-contact-form/
-
Submit button stylehttps://wordpress.org/support/topic/submit-button-style-4/
-
Change prompt texthttps://wordpress.org/support/topic/change-prompt-text/
-
Custom Box size + submit buttonhttps://wordpress.org/support/topic/custom-box-size-submit-button/
-
How to change color of Button and borders?https://wordpress.org/support/topic/how-to-change-color-of-button-and-borders/
-
HOW TO CHANGE FONT INSIDE TEXT BOXhttps://wordpress.org/support/topic/how-to-change-font-inside-text-box/
-
[NSFW] How to set colors for hover send button?https://wordpress.org/support/topic/how-to-set-colors-for-hover-send-button/
-
Submit Button 404 Pagehttps://wordpress.org/support/topic/submit-button-404-page/
-
Resizing Contact Form Buttonhttps://wordpress.org/support/topic/resizing-contact-form-button/
-
Delete Topichttps://wordpress.org/support/topic/delete-topic-5/
-
Unwanted Buttons on Contact pagehttps://wordpress.org/support/topic/unwanted-buttons-on-contact-page/
-
Can’t follow a link attached to a texthttps://wordpress.org/support/topic/cant-follow-a-link-attached-to-a-text/
-
Submit Button is Missinghttps://wordpress.org/support/topic/submit-button-is-missing-5/
-
form cross button with empty a-tag href valuehttps://wordpress.org/support/topic/form-cross-button-with-empty-a-tag-href-value/
-
Screan reader readable send buttonhttps://wordpress.org/support/topic/screan-reader-readable-send-button/
-
not workinghttps://wordpress.org/support/topic/not-working-4236/
-
Modify acceptance.php and translate in italian language ?https://wordpress.org/support/topic/modify-acceptance-php-and-translate-in-italian-language/
-
how to change input font in text boxes/areashttps://wordpress.org/support/topic/how-to-change-input-font-in-text-boxes-areas/
-
Submit button hover animationhttps://wordpress.org/support/topic/submit-button-hover-animation/
-
Editing the Contact Form Submit Button & Email Fieldhttps://wordpress.org/support/topic/editing-the-contact-form-submit-button-email-field/
-
Previous button issuehttps://wordpress.org/support/topic/previous-button-issue/
-
Link on contact page is not workinghttps://wordpress.org/support/topic/link-on-contact-page-is-not-working/