Add a background image to a card

@Neicudi

So, here I am again. Sorry to keep spamming the forum with questions. :sweat_smile: I am trying to add a background image to the Kitsun-Vocabulary layouts but the css that works in Anki does not seem to work here. Basically nothing changes when I add the following to the styling:

.card{
background-image: url(’ https://data.kitsun.io/5f3426ceaa0a331b53da3bd0/5f414b819af78d1b592ca18b/gosc3paper_ texture.jpg’);
}
Any idea of what I am doing wrong?

Many thanks! :blush:

2 Likes

That’s completely fine, don’t worry about it haha :smiley:

It seems to be working for me, but I had to change the quotes and remove a space from the url:

.card{
background-image: url('https://data.kitsun.io/5f3426ceaa0a331b53da3bd0/5f414b819af78d1b592ca18b/gosc3paper_ texture.jpg');
}

If you copy paste that, it should work. If not, you have to double check that you actually have a .card div in the template


(I added a div with “card” as the class and put a text element in there for testing purposes)

Or are you trying to set a bg for the whole card and assumed .card is the class for the whole thing? If so you can just leave out the .card { } part and put in:

background-image: url('https://data.kitsun.io/5f3426ceaa0a331b53da3bd0/5f414b819af78d1b592ca18b/gosc3paper_ texture.jpg');

Let me know if it works for you! :smiley:

2 Likes

Thanks a lot! :):grinning: I was trying to apply a background to the whole card. Your solution worked like a charm. Much appreciated.

2 Likes