Display Divi Email Optin Module Form Fields Inline

Written by Dan Mossop

Organizing your Divi Email Optin module's fields inline creates a sleek and professional appearance that can improve user experience and potentially increase conversion rates. By arranging the email field and submit button side by side, you make the form more visually appealing and save space on the page. In this guide we show you how to easily display your Divi Email Optin form fields inline.

Display Divi Email Optin Form Fields Inline using the Divi Booster 'Inline Form' Option

This method demonstrates how to arrange Divi Email Optin form fields side-by-side using the 'Inline Form' option added by the Divi Booster plugin. This approach is ideal if you want a quick, no-code solution.

Add and Configure the Email Optin Module for Inline Display

Within your Divi Builder layout, add an Email Optin module to your desired section. In the module's settings expand the Email Account section under the Content tab. Configure your desired Service Provider, if you haven't already.

Adjust Layout and Enable the Inline Form Option

Switch to the Design tab in the Email Optin module settings, then expand the Layout group. In the Layout dropdown, select your preferred layout. Next, turn ON the Inline Form toggle (added by Divi Booster) to arrange the form fields side-by-side.

Save and Publish Your Changes

Once your settings are configured, click the green checkmark button to save the module, then open the Divi Builder toolbar and publish your page. This ensures your changes go live.

Confirm the Inline Form on the Front End

Visit your published page and check your email optin form. You should see the email input field and subscribe button arranged neatly in a single horizontal line.

Style Divi Email Optin Module for Inline Form Display using Custom CSS

This method shows you how to apply custom CSS within the Divi Email Optin module’s settings to display form fields side-by-side, achieving an inline layout. This approach is especially useful if you want a flexible solution that doesn’t require custom code files or external plugins.

Add and Configure the Email Optin Module

Add an Email Optin module to your layout and expand the Email Account section, selecting your preferred Service Provider.

Add Custom CSS for Inline Styling

Navigate to the Advanced tab of the Email Optin module settings. Expand the Custom CSS section and locate the free-form CSS field. Paste the following CSS code into this area to display your form fields inline on larger screens:

@media only screen and (min-width: 981px) {
  selector .et_pb_newsletter_form form {
    display: flex;
    width: 100%;
    grid-gap: 20px;
  }
  selector .et_pb_newsletter_form .et_pb_newsletter_field,
  selector .et_pb_newsletter_form .et_pb_newsletter_button_wrap {
    flex: 1 1 0%;
  }
  selector .et_pb_newsletter_form p.et_pb_newsletter_field {
    padding-bottom: 0;
  }
}

You may see an "Unknown property" warning in the CSS box, but you can safely ignore this – it's a limitation of the CSS box which doesn't affect the styles from applying on the front-end.

Save and Publish Your Changes

After adding your CSS, save the module, open the Divi Builder toolbar, and publish your page so your new styles are visible on the live site.

Check That the Inline Form Style is Applied

Visit your page on the front end and confirm that the email field and subscribe button now appear side-by-side in a single row.

Conclusion

Displaying your Divi Email Optin form fields inline can give your site a cleaner, more modern look and enhance the user experience. Whether you use Divi Booster's built-in option or add your own custom CSS, the process is simple and effective.

Thanks to this tutorial by Geno for the original inspiration and implementation of this feature. 

Boost Your Divi with Enhanced Features

Discover how Divi Booster can elevate your site customization. With our latest update, easily activate new options like horizontal layouts for your email opt-in modules. Effortlessly unlock hundreds of features to empower your Divi designs.

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

7 Comments

  1. It looks like a recent Divi update may have broken this again, as the inline form button isn't working, and neither is this code. I can't get the submit button to sit in line with the fields. 😫

    Reply
    • Always the way… ignore my last post, it works fine IF you have the form set to text above, form below. D'oh. Sorry!

      Reply
      • Hey Jo, thanks for bringing this to my attention. I hadn't noticed that the layout options Divi had added were affecting it – I'm glad you were able to find one that worked :) Next chance I get I'll have a play around and see if I can make it compatible with all the layout options. Thanks!

        Reply
  2. Thank you so much for this. I have been looking for a very long time for a CSS code like this. Much appreciated.

    Reply
    • You're welcome, CC!

      Reply
  3. Just wanted to thank you for all the help you post for us new to Divi and CSS. Much appreciated. I am purchasing your booster.

    Reply
    • You're very welcome, Steven! Enjoy Divi Booster and give me a shout if there's ever anything I can help with. Cheers!

      Reply

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

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

We may earn a commission when you visit links on our website.

Latest From Divi Booster

Set Hover Color for Menu Links in the Divi Menu Module

Customizing the hover color of menu links lets you enhance the user experience and maintain visual consistency with your website’s brand. By setting a specific hover color, you can guide visitors' attention and improve navigation feedback. In this guide we show you...

Enable Automatic Looping for YouTube Videos in the Divi Video Module

Enabling automatic looping for YouTube videos in your Divi video module ensures that content plays seamlessly and continuously without interruption. This feature can enhance user engagement, highlight key information, or create dynamic visual effects on your website....

Hide Video Controls in Divi Video Module

Disabling YouTube video controls in the Divi Video Module helps create a seamless, distraction-free viewing experience for your site visitors. This approach is useful when you want full control over how your video content appears and is interacted with on the page, or...

Mute YouTube Videos by Default in the Divi Video Module

In the Divi Video Module, starting your YouTube videos muted by default can create a more user-friendly browsing experience on your webpage. It is particularly beneficial for reducing distractions, enhancing visitor engagement, and providing a seamless content preview...

Autoplay Videos in Divi Video Module

Enabling videos in your Divi video module to start playing automatically can enhance both the site's design and user engagement. To ensure full compatibility with browser requirements, such as Chrome's autoplay policy, it's often necessary to start your videos muted...

Random Divi Posts