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.

  • I sorta just gave up on this now, but I would still be fine with a potential solution.
    Probably is just something wrong with the css I put with like image repeat or something I’m not really good at CSS

  • 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?

  • @pitaj well I’ll have to try without the dark mode lol, but when I make that css rule apply to both dark/light so even the light has a darker back, it still happened. I’ll try your gradient as a test


Suggested Topics


| | | |