+ 2

I want to set a background image in my trial webpage where have i gone wrong? I have used <img src="logo. Jpg"/>

html

23rd Apr 2017, 4:54 AM
Emmy Logiron
Emmy Logiron - avatar
8 Réponses
+ 6
<body style="background-image: url('logo.png');"> Your code is inserting a picture in the page. Use the code above instead.
23rd Apr 2017, 4:58 AM
Alireza M
Alireza M - avatar
+ 6
hmm. I can only guess. First make sure that you use double quotation marks for the style and single quotation marks for the path. Exactly like I wrote it. Second make sure that your path is correct. If the picture is in the same path as the Html file, you can write it like : logo.jpg But if it's in another path or it's on the Internet, give it a full path like: c:\folder\logo.jpg Also be careful of the extension. If it is jpeg and you insert jpg it might not work. That is all I could say about it.
23rd Apr 2017, 7:45 PM
Alireza M
Alireza M - avatar
+ 5
Emmy Logiron, was my answer incorrect?
23rd Apr 2017, 7:13 PM
Alireza M
Alireza M - avatar
+ 1
if I use URL and my picture is in desktop will it still work?
23rd Apr 2017, 5:23 AM
Emmy Logiron
Emmy Logiron - avatar
+ 1
it has not worked
23rd Apr 2017, 7:35 PM
Emmy Logiron
Emmy Logiron - avatar
+ 1
what could be the problem?
23rd Apr 2017, 7:36 PM
Emmy Logiron
Emmy Logiron - avatar
0
1. insert the full path of your image or 2. change the extension jpg to jpeg.
23rd Apr 2017, 5:52 AM
Rajeev Jain
Rajeev Jain - avatar
0
thanks
23rd Apr 2017, 5:55 AM
Emmy Logiron
Emmy Logiron - avatar