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.

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.

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

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

Latest From Divi Booster

Fix Divi Text Module "Regular" Font Weight Not Working

Are you encountering an issue where the font weights in Divi's Text Module don't seem to apply as expected? In particular, you might find that when you set the text module's body text font weight to "Regular", your font is actually assigned a weight of 500 instead of...

Make the Divi Gallery Module Swipeable

The Divi Gallery Module comes with a slider mode that lets you display images in a slider with clickable left/right arrows to scroll through the images. For mobile / touchscreen users, you can improve the user experience by allowing your user to swipe to navigate to...

How to Use Divi Dynamic Content in Woo Modules Product Selector

Divi's Dynamic Content is a powerful feature that lets you populate your Divi modules and theme builder templates with data pulled in various sources, such as custom fields. This allows for efficient organization and maintenance of your sites.Unfortunately, Divi's...

Removing Gaps in Divi Builder Layouts

Designing a seamless, professional-looking website is often about managing space effectively. Gaps in Divi Builder - particularly excessive white space between sections, rows, or modules - can disrupt your layout, leading to a fragmented and less engaging user...

Random Divi Posts