Fix Divi Comment Button Responsiveness when using WordPress Simple Security Firewall

Written by Dan Mossop

Keith contacted me when he discovered that his site about Divi (created using the Divi Theme, of course) was failing Google's mobile-friendly test. Google is planning on penalizing the rankings of sites which are not responsive, so getting this sorted out was obviously a priority.

One thing Google was complaining about was that content was being displayed outside the viewing area. Taking a look, I noticed that Keith's comment button initially displayed the text "Please wait 30 seconds before commenting" (as an anti-spam measure added by the WordPress Simple Security Firewall plugin). However, Divi wasn't properly handling the increased text length and it was spilling off the side of the page. Here's how it looked:

mobile-button-responsive-before

To fix this I came up with the following CSS, which ensures the button doesn't exceed the content width and that if the text is long, it wraps onto a new line:

@media only screen and (max-width: 479px){
.form-submit input { max-width: 280px; white-space: normal; }
}
@media only screen and (min-width: 480px) and (max-width: 768px){
.form-submit input { max-width: 400px; white-space: normal; }
}

I've added this fix into the latest update to the Divi Booster plugin, under "Plugins > WordPress Simple Security Firewall", which I'll be releasing in the next day or so.

Here's the result:

mobile-button-responsive-after

Now the button should remain responsive at all times, and pass Google's Mobile-Friendly Test.

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

Check out Divi Booster

Divi Booster upgrades Divi with hundreds of new features, including fixes for common design issues like the comment button responsiveness you encountered with WordPress Simple Security Firewall. Keep your Divi sites mobile-friendly with ease.

Latest Posts

Customize Lightbox Title Styling in the Divi Gallery Module

Adjust the appearance of the lightbox title that appears when visitors open images from a Divi Gallery to align with your brand and improve readability. Refining the title’s color, size, and weight enhances visual hierarchy, accessibility, and overall polish. In this...

Center the Lightbox Image Count in the Divi Gallery Module

Centering the image count in a gallery lightbox creates a cleaner, more balanced presentation and makes it easier for visitors to see where they are in the image set. This simple visual tweak can enhance readability, especially with larger images and longer captions,...

Style the Divi Gallery Module Lightbox Image Count

Tailor the appearance of the image counter in the Divi Gallery module lightbox to match your brand and improve readability. By customizing the counter’s color and typography, you ensure it displays clearly and suits your design. In this guide we show you how to style...

Customize the Lightbox Image Background Color in the Divi Gallery

Control the color that appears behind your images when users open in the gallery lightbox, including support for semi-transparent hues. This helps improve contrast for transparent images, align the experience with your brand palette, and create a more polished viewing...

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, 

2 Comments

  1. Hi Dan
    Can't thank you enough for this.

    The "WordPress Simple Firewall" is a great plugin but the lack of responsiveness on the Submit button was driving me crazy!!!

    Also thanks for you advice regarding the "robots.txt file" which I shall look at shortly.

    Reply
    • No problem, Keith! It's great to see you are now mobile-friendly :)

      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 *.