+ 2
How can i set background picture using html or css
i complie that code on phn using sololearn using background tag but it doesn't work i copy the local path address https://code.sololearn.com/WE6K2b5Oqwi1/?ref=app
9 Réponses
+ 4
2 things:
* You have in the CSS tabs HTML code. You cannot do that. Make sure that everything in the CSS tab is styling stuff.
* Next, you can get images from the web directly or put images on your phone or laptop on Dropbox and then use them in your code. In Code Playground you cannot use directly an image that is on your phone.
Edit: Reet Here is a tutorial for using images you put on Dropbox
https://www.sololearn.com/Discuss/1054246/?ref=app
+ 11
There is some mistake in that code.
1st of all u have used an image for background which is in ur storage not ours. U should use the url of an image in the url tag.
Secondly it is background-image not background_image.
The inline styling of body is as follows :
<body style="background-image: url( "http://www.sololearn.com/uploads/css_logo.png" )"></body>
+ 9
Reet I told you it's background-image not background_image. Correct that. And the image url you used seems to be incorrect.
+ 8
ok Reet see the styling of body in the css part of the code
https://code.sololearn.com/WMoE618WMolH/?ref=app
+ 3
Also, again, get rid of what you have now in the CSS tab and replace with this:
html, body{
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
This will assure that all the visible area is covered by the image
+ 2
thanks
+ 2
3 things:
* Like Rohan had said: it has to be background-image not background_image
* Make sure the link ends with .jpeg or .png... Otherwise it is not an image
* You cannot have " " inside " ". I am talking about your styling part in the body tag. If the image links is surrounded by " ", surround the style parts with ' '.
+ 1
it doesn't work when i complie in css tab