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.
4 Answers
+ 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.
+ 3
Use
background-image: url(url)
+ 2
No, only inside
+ 1
Sp do I put the url twice? Once outside and the other inside?