Mobile Background image form broken
-
Hello everyone, I’m writing to you because I’m encountering some problems with the plugin, I’ve tried to fix it myself but I’m not having any success.
The problem:
I created a newsletter signup form, it has a background image. More or less everything is okay in the browser version but when I switch to the mobile version the image disappears and consequently the white text on it becomes invisible having the white background of the site, so everything becomes unusable.
I read on this forum that this is normal behavior, I read what was proposed to do but they didn’t work for me. Also, the code placed in Appearance > Customize > Additional CSS doesn’t work for me either.
I’ll list the plugins I’m currently using and what I’ve tried to do so far.
My Theme: Royal Addons.
Plugins:
- Akismet Anti-spam
- Duplicate Page
- Easy Table of Contents
- Elementor
- GTranslate
- Hostinger Tools
- iubenda
- LiteSpeed Cache
- Royal Elementor Addons
- Site Kit by Google
- The SEO Framework
- Wordfence
What I’ve tried to do:
- Inserting the following CSS code in Appearance > Customize > Additional CSS:
@media (max-width: 500px) {
#mailpoet_form_2 {
background-image: url(https://whereispal.it/wp-content/uploads/2025/01/Sfondo-Modulo-Newsletter.jpg) !important;
display: block !important;
}
#mailpoet_form_2 > form * {
color: black !important;
}
}
But this doesn’t work, in the mobile preview on WordPress I see everything correctly. I clear the cache, go to my mobile phone and it doesn’t work: the background image is not shown and the text remains white.
- Then I wanted to do another test, using the developer tools I saw that ‘Background-image: none’ is set with the 500px media query, so I tried to modify the plugin in mailpoet/lib/Form/Util/Styles.php and delete the parameter on line 231: ‘background-image: none;’, I cleared the cache, I published everything but the background is still not shown on mobile.
Do you have any idea how I could solve this?
- The HTML-CSS structure of the form and How it looks on Desktop https://snipboard.io/P6Lx3C.jpg
- How it looks on Mobile https://snipboard.io/YMu1Gh.jpg
The topic ‘Mobile Background image form broken’ is closed to new replies.