Code by Day | Explore By Weekend
How To Create A Single Field Divi Email Optin Module Tutorial by Pee Aye Creative.jpg

How To Create A Single Field Divi Email Optin Module

This tutorial will show you how to style and customize the Divi Email Optin module and make a horizontal single field optin layout for your email signups!

Style & Customize The Divi Email Optin Module

To begin, style the Divi Email Optin module however you want using the design settings. You can design the input fields and button using all the available Divi settings. The main benefit to this tutorial is not how to do that, since those are all standard Divi Builder features, but rather it is the CSS that makes this all work together beautifully which will be added in the next step.

Toggle Off The Email Optin Fields

There are only a few steps that are required, and they are very easy. First, go in the module settings and turn off all the toggles for the name fields. The screenshot below shows how this will look when you are done with that.

Turn off all the field settings in the Divi Email Option module

Set The Email Optin Layout

Next, be sure to set the layout to “Body On Top, Form On Bottom” for this to work well. This is the last required step, so go ahead and any other design adjustments and proceed to the CSS snippet below.

Divi email optin module layout for making horizontal single field

Add CSS To Make The Divi Email Optin Inline Horizontal

Now that we have the module set up, it’s time to add the CSS that does the tricks we need it to do. 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.

@media (min-width: 767px) {
	/*set the width of the input fields minus the width of the button*/
	.et_pb_newsletter_fields .et_pb_newsletter_field {
		flex-basis: calc(100% - 225px) !important;
	/*set the width of the button*/
	.et_pb_newsletter_fields .et_pb_newsletter_button_wrap {
		flex-basis: 210px !important;

Media Query

You’ll notice a couple of things are happening here. First of all, the entire snippet of code is wrapped in a media query. The purpose of that is to allow the optin module to change to a stacked layout on screens smaller than 767px.

Learn More About Media Queries

Input Field Width

The first part of the code makes the input field area 100% wide, but we are using a CSS trick to calculate 100% minus the width of the button.

Button Width

The next part of the code is setting the width of the button. Notice how there is a difference in the pixel value. The reason for that is to allow space for the gap between the email field and the button.

Single Field Horizontal Divi Email Optin Module Examples

Like I said at the beginning, I like to use these on our child themes and on client sites. So I thought I would inspire you by showing you some of the designs I have used.

Divi LMS Child theme single field email optin example
Divi Photographer Child theme single field email optin example
Divi Mowing Child theme single field email optin example
Divi Storefront Child theme single field email optin example

Please share this post!

Nelson Lee Miller (aka The Divi Teacher)

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

Join Our NEW Divi Facebook Group!

The Divi Teacher Logo

Recent Posts

Leave A Response!

Notify of
Newest Most Voted
Inline Feedbacks
View all comments
1 month ago

realy help full thank you

18 days ago

Hey Nelson, I have a problem with this, it is showing this at the backend but not on the front end dont know why?

Shop Our Divi Products!

Child Themes • Plugins • Layouts

Visit The Shop

become partners with Pee Aye Creative

Partner With Us

We are looking for you!

Learn More

Divi Tutorials On YouTube

Join over 3,700 others and subscribe to our helpful Divi videos!

Visit Our Channel

Pin It on Pinterest


Your Cart