0

CSS background image not showing

So this image won't work for some reason. Is the layout wrong or something? The CSS file is linked because its width is right and the font is right, it`s just the image that`s not working. I have a folder called Prog, which has two folders called CSS and HTML, HTML has Blog.html as a file and CSS has a folder called Blog that has Blog.css and the image as a file. <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <title>ggg</title> <link rel="stylesheet" href="C:\Users\john8\OneDrive\Desktop\Prog\CSS\Blog\Blog.css"> </head> <body> <header id="main_header"> <div class="container"> Sal_Toosh </div> </header> </body> </html> body{ font:Arial, sans-serif; } .container{ width:80%; margin:auto; } #main_header{ font:900 20px; background-image:url("C:\Users\john8\OneDrive\Desktop\Prog\CSS\Blog\Header.jpg"); height:1000px; }

28th Jul 2020, 5:08 PM
Prog
Prog - avatar
4 Answers
+ 1
Ok fixed it, idk why everyone uses quotations for URL kept getting me confused. Used url(Images/Header .jpg)
28th Jul 2020, 5:58 PM
Prog
Prog - avatar
+ 1
Hoping This will help you.. Next time pls Use the search bar and for more... There are lot already similar questions... https://www.sololearn.com/Discuss/2402873/?ref=app
28th Jul 2020, 5:11 PM
Jayakrishna 🇼🇳
+ 1
According to standards and conventions you need to put in between quotes. Otherwise it won't recognise where is start and where is end..
28th Jul 2020, 6:16 PM
Jayakrishna 🇼🇳
0
Thanks
18th Aug 2020, 8:26 AM
AWUJO DARLINGTON
AWUJO DARLINGTON - avatar