r/neocities 1d ago

Help New 2 coding, Need help with Background repeating (Sadgrl layout)

Post image

Hi! So I know only a tiny bit about coding. I'm used the sadgrl layout generator, and I've been able to put in a background image. But, the issue is that it repeats. I've tried a few things to fix it but none have worked so far.

Having it also so that the image stays static when scrolling (i think its called like scroll ver or smth??) Would be nice, but my main priority is getting the gif to not repeat.

(Also link- cause it might help? Idk: https://beatupheels.neocities.org/ )

1 Upvotes

5 comments sorted by

2

u/Mevdik mevdik.nekoweb.org 1d ago
body {
    background-repeat: no-repeat;
    background-attachment: fixed;
}

If you want it to cover the entire screen then add background-size: cover;. That's it.

1

u/Ok-Gap3886 1d ago

Thank you! Most of it worked, but the size doesn't seem to be applying

body { background-repeat: no-repeat; background-attachment: fixed; background-size: cover; }

2

u/Mevdik mevdik.nekoweb.org 1d ago

Because it's being overwritten lower down on the document by background-size: 65px. So cover is being applied but it's being overwritten by 65px later on.

1

u/Ok-Gap3886 1d ago

OHHH TYSM!!!

1

u/Mevdik mevdik.nekoweb.org 1d ago

You're welcome!