CSS Background removes when window is not full size
Unsolved
General Discussion
-
Hello. I'm trying to change the background of my site With Custom CSS, but it only shows when the window is full size. So it doesn't work on mobile either. Here is the code i put:
body.lights-out { background-image: url("https://forum.example/assets/uploads/files/sitebgcover-default.png") !important ; }
Please note: the "lights-out" is part of css for a dark mode plugin. It does the same effect with just
body { background-image: url("https://forum.example/assets/uploads/files/sitebgcover-default.png") !important ; }
But I'm gonna use a different image file.
Thank you in advance.
-
The following code seems to work fine for me on this site, regardless of the window size:
body { background: radial-gradient(circle, rgb(63, 94, 251) 0%, rgb(252, 70, 107) 100%); }
It is only in dark mode that this doesn't work?
Copyright © 2025 NodeBB | Contributors