How To Add Focus Input Field Borders To The Divi Contact Form Tutorial by Pee Aye Creative

How To Add Focus Input Field Borders To The Divi Contact Form

In this tutorial I will show you how to make highlighted focus input field borders in the Divi Contact Form module.

FYI: You can do this with a setting directly in the Divi Contact Form module with our popular Divi Contact Form Helper plugin! Take a look, it is so easy!

Divi Contact Form Helper by Pee Aye Creative

1. Add A Custom CSS Class To The Divi Contact Form

The first step in the tutorial is to add a custom CSS class to the Contact Form module. This is used to target the correct module with the code in order to only make this affect only a specific module. 

To add the custom class, open the module settings and go to the Advanced tab. Go to the CSS IDs & Classes toggle. Place the class “pa-contact-form-focus-borders” in the CSS Class input field of the Contact Form module.

add the CSS class to the Divi Contact form to add focus input field borders

2. Add The Custom CSS Code Snippet

The second step is to add the custom CSS code to your website. This step is also very easy, and we are doing the work with only a few lines of CSS.

If you are using our free Divi child theme, place this snippet into the style.css file. Otherwise, place this in your Divi>Theme Options>Custom CSS code box. If you need help, check out our complete guide on Where To Add Custom Code In Divi.

/*add focus input field borders to the Divi Contact Form module*/
.pa-contact-form-focus-borders input:focus,
.pa-contact-form-focus-borders textarea:focus {
	border: 2px solid #00d263;
}

After adding and saving the code, your form fields would look like this when you click to type:

focus input border styling for the Divi contact form

The code is very simple. It targets the custom class added to the module and uses the :focus pseudo class. The focus state is triggered when a user clicks within the field element. When that happens, the CSS for the border is applied.

You can customize the thickness and color according to your own preference.

Do It With A Setting!

Make life easier and use the Divi Contact Form Helper plugin instead, the ultimate Divi Contact Form upgrade with awesome features and settings!

Divi Contact Form Helper by Pee Aye Creative

The Divi Contact Form Helper plugin has design settings to quickly add the focus input borders. Using the plugin can save you loads of time and add lots of additional functionality. Be sure to check out all the other amazing features!

input field focus border settings in the Divi Contact Form Helper plugin
6

Last updated Jul 4, 2022 @ 10:13 pm

Subscribe

Each month we send out a roundup email newsletter with the latest tutorials, product updates, helpful resources, and any other industry or personal news. Occasionally we send an extra separate email here and there if we just can’t wait! So that’s what you will get if you subscribe, and you can always unsubscribe at any time if you just can’t take it anymore :)

Please share this post!

Nelson Lee Miller (aka The Divi Teacher)

Nelson is the owner of Pee-Aye Creative in the beautiful state of Pennsylvania. He loves helping small businesses, exploring outdoors, building websites with Divi, and teaching others.

Leave A Response!

By commenting you agree to our Blog & YouTube Comments Policy

2 Comments

  1. Peter

    Excellent thank you again. Nice and easy as always. A nice little touch, put it straight on and using it.

    Reply

Submit a Comment

Your email address will not be published.

Recent Posts

Pin It on Pinterest

0

Your Cart