Hello, I am trying to change the background color of my image text module on mobile. I can change the color however the margined spaces are still white. Can someone help? https://www.hfcousa.com
Topic summary
A user encountered an issue where changing the background color of an image-with-text module on mobile left white margins around the colored area.
Solution provided:
- The problem was caused by margin being applied to the wrong CSS selector
- A corrected CSS media query was shared targeting screens max-width 480px
- The fix involved setting
.caption--below-true .captionmargin to 0px and applying the background color to.position-left.caption.js-caption
Outcome:
The solution successfully resolved the white margin issue. The thread is marked as resolved.
1 Like
Hi @geanyesboy
Your margin is in the wrong selector.
Check this one.
@media only screen and (max-width: 480px){
.caption--below-true .caption {
margin: 0px !important;
}
.position-left.caption.js-caption {
background: aqua;
}
.caption-content.align-left {
margin: 20px auto;
}
}
And Save.
Result:
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!
1 Like
Thanks that helped ![]()
1 Like

