How do I add a background image (from a url) to my new magazine?

I have tried this code:
body { background-image: url('https://imgur.com/9Ns6RVS.png'); background-repeat: no-repeat; background-size: cover; }

Didn't work. Please help, thanks!

1 points · 9 comments · view on lemmy.world

9 Comments

raltsm4k@kbin.social · 0 pts · 3y (8 replies)

Figured it out, you need to target #middle instead of body for the background to appear :)

minnieo@kbin.social · 0 pts · 3y (7 replies)

okay, sooo be nice cause i don't know how to code at all lol, so idk if i did it right, but, when i did this:
middle { background-image: url('https://imgur.com/9Ns6RVS.png'); background-repeat: no-repeat; background-size: cover; }

it still didnt work :(

raltsm4k@kbin.social · 0 pts · 3y (6 replies)

No worries, you need to include the pound sign before middle. So
#middle { background-image: url('https://imgur.com/9Ns6RVS.png'); background-repeat: no-repeat; background-size: cover; }
should work.

minnieo@kbin.social · 0 pts · 3y (5 replies)

that didn't work either :(

raltsm4k@kbin.social · 1 pts · 3y (4 replies)

My bad, you need to remove the quotes from around the URL, it doesn't like those for some reason. So it'll be url(https://imgur.com/9Ns6RVS.png)

minnieo@kbin.social · 0 pts · 3y (3 replies)

OMFG THANK YOU IM SO DUMB LMAO. thank you this worked!!

raltsm4k@kbin.social · 0 pts · 3y (2 replies)

np!

minnieo@kbin.social · 0 pts · 3y

another question, is there any place for css themes for kbin around here? i certainly couldn't write it myself, and i can't find documentation on it. i understand it may not be flesh out yet, but shot in the dark