Background-image: url()

Background-image: url()
0

#1

Not sure if I’m running into a bug but I’m currently working on (Applied Visual Design - Create Texture by Adding a Subtle Pattern as a Background Image), I’ve added the below code and tried without the image and the test does not pass, gives me the following message (“Your body element should have a background property set to a url() with the given link.”). I’ve done this before on codepen, editors, not sure why it’s not working here. Any guidance would be much appreciated. forgot to mention I also tried just using background: url(); with same result

‘’
body {
background-image: url(https://i.imgur.com/MJAkxbh.png);
}
‘’

Thanks,
Javier


#2

Nevermind, I have figured it out, the url is supposed to be wrapped in quotes


#3

You need to wrapp the address in quotes inside the parentheses.


#4

lol, as you were typing I figured that I forgot to do that lol, thank you.


#5

Could you give the code. I’m sorry but I don’t understand


#6

freeCodeCamp should fix this lesson and mention that the url() function requires that the address be wrapped in quotes. The image shows up regardless so it is very misleading.


#7
body { background: url("https://i.imgur.com/MJAkxbh.png"); }

#8
body { background: url(https://i.imgur.com/MJAkxbh.png) }