-2

this is the hmtl of the page and i m not seeing where s the error and the img doesn't show in notepad++.thanyou to answer me

  <!DOCTYPE html>
    <html>
    <head>
    <title>Page Title</title>
    <link rel="stylesheet" type="text/css" href="theme.css">
    </head>
    <body>
    </body>
    </html>
   /* this line doesn't show the img*/
    body {
       background-image: url("‪C:\Users\zineelabidine\Desktop\fayss.jpg");
       }
  • 1
    Do not use path like `C:\Users\zineelabidine\Desktop\fayss.jpg`. Use a relative path to your server-root. – wayneOS Apr 13 '18 at 12:29
  • If you want to test the image just upload it to a site like imgur and grab the link. Then update your css with the new url. – Rick Sibley Apr 13 '18 at 16:05
  • 1
    Possible duplicate of [CSS background image URL failing to load](https://stackoverflow.com/questions/6401865/css-background-image-url-failing-to-load) – Austen Holland Apr 13 '18 at 16:50

2 Answers2

0

For an img tag, you don't use a fixed path l‪ike ‪C:\Users\zineelabidine\Desktop\fayss.jpg. Use a relative path like url('fayss.jpg'). (That path was assuming that the image and the html file are in the same folder)

0

Keep your Image and html file in same folder and use this code, Hope it helps you:

body {
   background-image: url("fayss.jpg");
   }