0

Why doesn't "background-image" work?

<!DOCTYPE html> <html lang = "en-US"> <head> <title> Tay K </title> </head> <body> <div id = "image"> <h1> Refrigerator </h1> </div> </body> </html> #image { background-image: https://cdn2.harveynorman.com.au/media/catalog/product/cache/21/image/992x558/9df78eab33525d08d6e5fb8d27136e95/g/p/gp615395_1.jpg("fridge.jpeg"); } I still don't understand? I put url twice both outside and in parenthesis with and without quotation marks and it didn't work.

22nd Jul 2018, 5:33 PM
Eddy
Eddy - avatar
4 ответов
+ 2
Hi Eddy The syntax of background-image is Background-image: url(url); but the first url is a keyword, you don't have to change it.
22nd Jul 2018, 6:41 PM
Guillem Padilla
Guillem Padilla - avatar
+ 3
Use background-image: url(url)
22nd Jul 2018, 5:53 PM
Paul Grasser
Paul Grasser - avatar
+ 2
No, only inside
22nd Jul 2018, 8:09 PM
Guillem Padilla
Guillem Padilla - avatar
+ 1
Sp do I put the url twice? Once outside and the other inside?
22nd Jul 2018, 8:07 PM
Eddy
Eddy - avatar