Tagged: background image, color section, mobile, portrait, Section
Hey there,
there are plenty Threads about not showing background on mobile devices, or resize them.
What I’m looking for is to set a custom background-image for mobile (portrait) for a color section:
I’ve tried this:
#top .custom-section-id {
background-image: url("mymobilepicture.jpg")!important; }
and also
#top .custom-section-id {
background: url("mymobilepicture.jpg") no-repeat fixed center !important; }
None of them work. Still it shows the “desktop” background-image of the section.
Could you help out?
Thanks
Alex
Hey alexanderduenchem!
Thanks for getting in touch with us!
You need to add media query CSS to your code. The above codes you used should look more like this:
@media screen and (max-width: 797px) {
#top .custom-section-id {
background: url("mymobilepicture.jpg") no-repeat fixed center !important;
}
}
If the above still does not work, could you please provide a link to your site and the section you want the background for, so that we can have a closer look. You can place the information in the Private Content section of your reply.
Best regards,
Jordan
Hi Jordan,
thanks for your fast reply. I did this in the media section of my css file (just didn’t mention it in the code here sorry) but it does not work.
I guess they kinda had the same problem here: https://kriesi.at/support/topic/enfold-background-image-remove-on-mobile/
But no solution.