Style Contact Form 7 with CSS, by asking
CMSHands, a free WordPress plugin, adds a chat to your dashboard. Type “Make my contact form match the rest of the site.” See the new form first; one-click undo.
Block themes only. It styles the form; it doesn't build new forms. How to tell
Block themes only. It styles the form; it doesn't build new forms. How to tell
Contact Form 7 is a trademark of its owner. CMSHands is not affiliated with it.
Works on sites hosted at
Watch it do this on a real site
You ask
Make my contact form match the rest of the site.
Make my contact form match the rest of the site.
- Looking for what you meant
- Listing your plugins and themes
- Looking at your theme’s colours and sizes
- Reading one of your pages
- Reading a file on your site
- Preparing the new styles for your OK
- Previewing the change


- /* CMSHands: Contact form fields and button */
- .wpcf7 input.wpcf7-form-control:not([type="submit"]),
- .wpcf7 textarea.wpcf7-form-control {
- background-color: var(--wp--preset--color--base-2);
- border: 1px solid var(--wp--preset--color--contrast-3);
- border-radius: .33rem;
- box-sizing: border-box;
- color: var(--wp--preset--color--contrast);
- font-family: inherit;
- font-size: var(--wp--preset--font-size--medium);
- padding: .6rem .75rem;
- width: 100%;
- }
- .wpcf7 input.wpcf7-form-control:focus,
- .wpcf7 textarea.wpcf7-form-control:focus {
- border-color: var(--wp--preset--color--contrast);
- outline: 2px solid var(--wp--preset--color--contrast);
- outline-offset: 1px;
- }
- .wpcf7 input.wpcf7-submit {
- background-color: var(--wp--preset--color--contrast);
- border: 1px solid var(--wp--preset--color--contrast);
- border-radius: .33rem;
- color: var(--wp--preset--color--base);
- cursor: pointer;
- font-family: inherit;
- font-size: var(--wp--preset--font-size--small);
- font-weight: 500;
- padding: .6rem 1rem;
- }
- .wpcf7 input.wpcf7-submit:hover,
- .wpcf7 input.wpcf7-submit:focus {
- background-color: var(--wp--preset--color--contrast-2);
- border-color: var(--wp--preset--color--contrast-2);
- color: var(--wp--preset--color--base);
- }
- .wpcf7 label {
- color: var(--wp--preset--color--contrast);
- font-size: var(--wp--preset--font-size--small);
- }

Styling Contact form fields and button
I'll find your contact form and see what's in it.
Ready for you to review — the fields and the Submit button now use the same colours, corner rounding and text sizes as the rest of the site's buttons and forms.
Make my contact form match the rest of the site.


- /* CMSHands: Contact form fields and button */
- .wpcf7 input.wpcf7-form-control:not([type="submit"]),
- .wpcf7 textarea.wpcf7-form-control {
- background-color: var(--wp--preset--color--base-2);
- border: 1px solid var(--wp--preset--color--contrast-3);
- border-radius: .33rem;
- box-sizing: border-box;
- color: var(--wp--preset--color--contrast);
- font-family: inherit;
- font-size: var(--wp--preset--font-size--medium);
- padding: .6rem .75rem;
- width: 100%;
- }
- .wpcf7 input.wpcf7-form-control:focus,
- .wpcf7 textarea.wpcf7-form-control:focus {
- border-color: var(--wp--preset--color--contrast);
- outline: 2px solid var(--wp--preset--color--contrast);
- outline-offset: 1px;
- }
- .wpcf7 input.wpcf7-submit {
- background-color: var(--wp--preset--color--contrast);
- border: 1px solid var(--wp--preset--color--contrast);
- border-radius: .33rem;
- color: var(--wp--preset--color--base);
- cursor: pointer;
- font-family: inherit;
- font-size: var(--wp--preset--font-size--small);
- font-weight: 500;
- padding: .6rem 1rem;
- }
- .wpcf7 input.wpcf7-submit:hover,
- .wpcf7 input.wpcf7-submit:focus {
- background-color: var(--wp--preset--color--contrast-2);
- border-color: var(--wp--preset--color--contrast-2);
- color: var(--wp--preset--color--base);
- }
- .wpcf7 label {
- color: var(--wp--preset--color--contrast);
- font-size: var(--wp--preset--font-size--small);
- }

Styling Contact form fields and button
- Adding styles to your site
- Checking the change
Done. I checked afterwards, and the change is in place.

- Reverting the change
- Checking the change
Undone. I checked afterwards, and it's back the way it was.
A real run on our test site, Quillmoor Pottery (WP 7.1.3, Twenty Twenty-Four), . From asking to done, it took 50 seconds.
- It adds CSS, the rules that set how your site looks, to style your Contact Form 7 forms and nothing else, on a block theme.
- You see the form before and after, on a computer and a phone, before anything changes.
- On an older (classic) theme it writes the CSS for you to paste.
Do this on your own site
That's the whole job. The plugin is free: 3 changes to try it, no account. Nothing changes until you press the button, and an undo within 24 hours gives the change back.
How to style Contact Form 7 with CSS in WordPress yourself
In WordPress, open Appearance › Editor › Styles › Additional CSS, add rules that start with div.wpcf7 for the fields and the button, then save.
Checked on WP 7.1,
1. In your dashboard, go to Appearance › Editor. Choose Styles, open the ⋮ (More) menu and choose Additional CSS.

2. Contact Form 7 puts every form in a box, written
div.wpcf7in CSS. Start each rule with it and it touches only your forms.3. For the fields, add:
div.wpcf7 input.wpcf7-text, div.wpcf7 textarea { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #958d86; border-radius: 6px; font: inherit; }4. For the button, add:
div.wpcf7 input.wpcf7-submit { background-color: #65574e; color: #ffffff; font: inherit; border: 0; border-radius: 100px; padding: 12px 32px; }5. Put your own colors in place of
#958d86, the border, and#65574e, the button. Press Review 1 change… at the bottom left, then Save.6. Open your form's page in a new tab and on your phone. Press Submit with a required field empty to check the error still shows.
On an older (classic) theme, the kind with Appearance › Customize instead of Editor, the same rules go in Appearance › Customize › Additional CSS. Press Publish to keep them. CMSHands can't add them there; it writes the CSS in the chat and tells you where to paste it.
Contact Form 7 leaves the look of its fields to your theme, so on many themes they show up as small, plain browser boxes. Your rules live in your site's styles, not in the plugin, so a Contact Form 7 update leaves them alone. Switching themes does drop them: each theme keeps its own Additional CSS. The two colors above are our test site's own gray and brown, the brown of its other buttons. A color code is # and six letters or digits.
Or ask for it in the chat
“Make my contact form match the rest of the site.”
Why it won't wreck your site
- Nothing changes until you press the button. Every change comes as a card that names it. Nothing happens until you press the button or Not now.
- You see it first. Old words in red, new words in green. For layout, before-and-after pictures on a computer and a phone.
- One click undoes it. When something can't be undone, like deleting a page or a plugin, the card says so before you press.
Where CMSHands stops
- Older (classic) themesOn a theme with Appearance › Customize instead of Editor, it can't add the CSS itself. It writes the rules for you to paste there.
- An exact match with your other buttonsIt uses your theme's colors and sizes. In our run, the Submit came out near-black, while the site's other buttons are brown and round. Check the After picture first.
- Building or changing the formIt changes how the form looks, not what it asks. New fields, the emails it sends and where messages go stay in Contact › Contact Forms.
- Other form pluginsWe've run it on Contact Form 7 only. We haven't tested other form plugins yet.
- Fonts, pictures and scriptsPlain CSS only, with the fonts your theme already has. No pictures, and no JavaScript, the code that makes a page react when you click.
More it can do
- Header and footer:
Keep your header on screen
“Make my header stay at the top of the screen when people scroll.”
It took 2 minutes 9 seconds on our test site. - Header and footer:
Change your footer
“Add our opening hours to the footer: Tue–Sat, 10am to 5pm.”
It took 39 seconds on our test site. - Words and pages:
Add a page
“Add a page called Classes: Saturday classes, 10am, $45, book by email.”
It took 12 seconds on our test site.
Questions about Contact Form 7 styling
Where do I add custom CSS for Contact Form 7?
In your site's Additional CSS, not in the plugin's own files, which an update would overwrite. On a block theme it's under Appearance › Editor › Styles, then the ⋮ menu. On an older theme it's Appearance › Customize › Additional CSS. Start each rule with div.wpcf7, the box around every form, so it touches only your forms.
How do I style one Contact Form 7 form and not the others?
Give that form a class of its own. In the Contact Form 7 block, open Form attributes in the sidebar and type booking under Class. In a shortcode, add html_class="booking", like [contact-form-7 id="9" html_class="booking"], keeping your form's own id. Then start those rules with form.booking instead of div.wpcf7. Your other forms keep their look.
Why isn't my Contact Form 7 CSS working?
Most often your theme's rule for fields wins over yours. Make yours more specific: div.wpcf7 input.wpcf7-text beats a plain input rule. Check the spelling, clear any cache plugin, then reload the page. Switched themes lately? Paste the CSS again, since each theme keeps its own Additional CSS.
Will it work with my theme?
On a block theme it adds the CSS itself: your dashboard shows Appearance › Editor. How to tell. On an older (classic) theme it writes the CSS in the chat and tells you where to paste it: Appearance › Customize › Additional CSS.
Is it free to restyle my form with CMSHands?
To start, yes: 3 changes with no account, then 10 a month once you add your email. Questions are free, up to 30 a day.
Written by the CMSHands team. First published .
Try it on your own contact form
- 1. Download the plugin.A free zip file
- 2. Upload and activate it.Plugins › Add Plugin › Upload Plugin
- 3. Give CMSHands a task.Press Start working, then ask in your words
Works best on WP 6.3 or newer with PHP 8.0 or newer. What works on older sites





