How to Move The Divi Contact Form Labels Above The Fields

by | Last updated Oct 28, 2024 | Divi Tutorials

Move The Divi Contact Form Labels Above The Fields (1)

According to User Experience professionals, it is preferable to position the labels outside the form fields rather than using inline labels (placeholder text) inside the fields.

To enhance user experience, here is a simple and effective approach to moving the Divi form labels above the fields.

Divi Contact Form Before Moving the Labels

Divi Contact Form Before Moving the Labels

Divi Contact Form After Moving the Labels

Divi Contact Form After Moving the Labels

By default, the Divi Contact Form displays the field labels inside of the form fields. This is not the best user experience since the placeholder text disappears when the user starts adding text in the field.

To move the Divi contact form labels above the fields, you can use some custom CSS code. Here are the steps to do it:

  • In the WordPress dashboard, go to Divi > Theme Options > Custom CSS.
  • Paste the following code in the text area:
/* Display field titles above fields */
.et_pb_contact_form_label {
display: block;
font-weight:bold;
bottom:3px;
}

/* Hide duplicate placeholders */
.et_pb_contact_form_container .input::placeholder {
    opacity:0;
}

/*Hide duplicate titles in radio buttons and checkboxes */
.et_pb_contact_field_options_title {
display:none;
}
  • Click on the “Save Changes” button to save the custom CSS code.

Pro Tip: How to Add CSS Code Snippets to the Divi Theme

With this custom CSS, the labels will be positioned above the fields in the Divi contact form. You can adjust the margin values to your liking to make the form look better on your website.

That’s all for today!

I hope that you enjoyed this post. Subscribe to Divi Banks on YouTube and join our newsletter for more crisp content on WordPress and web design.

Shop Divi Products

Buy nicely done Divi Layouts, Child themes, and extensions for your next Divi project.

Related Articles

How to Add Padding Around Featured Images in Divi’s Blog Module

How to Add Padding Around Featured Images in Divi’s Blog Module

If you're using the Divi theme for your WordPress website and want to customize the appearance of your blog posts page, one simple tweak you can make is adding padding around the featured images. This can help create a more visually appealing layout and better...

Divi Logo Guide: Everything You Need to Know

Divi Logo Guide: Everything You Need to Know

A professionally designed logo is a powerful branding asset that can leave a lasting impression on your website visitors. Research shows that a well-designed logo can boost consumer trust in a brand by an impressive 75%. But the question most people ask is – how do...

Leave a Comment

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

WP101 - FREE WordPress Tutorials

Enter your email address below to gain access to the FREE WordPress training.

You have Successfully Subscribed!

Pin It on Pinterest