+ 3

Please how do I do a background image in html/css?

background image

20th Apr 2018, 2:54 PM
Ukeme Wilson
Ukeme Wilson - avatar
8 Answers
+ 2
Unfortunately, you would have to find the URL to your image for it to work. However, if you really want to use your image, then you can upload it to places like Dropbox and save the url from there as a way of using it on your website - https://www.sololearn.com/discuss/1054246/?ref=app
20th Apr 2018, 3:10 PM
Faisal
Faisal - avatar
+ 3
In CSS, you can add the background-image to the body followed by the URL of the image to set it as the background. If you don't want the image to repeat itself, you can add the background-repeat property to the body and set it to none, and have background-size set of cover. body{ background-image: url("example.com/jpg"); background-repeat: none; background-size: cover; } Hope this helped! d:
20th Apr 2018, 3:03 PM
Faisal
Faisal - avatar
20th Apr 2018, 3:06 PM
Bug Slayer
+ 3
Thanks guys. but must the image be from a url. what If I want to upload from my gallery?
20th Apr 2018, 3:07 PM
Ukeme Wilson
Ukeme Wilson - avatar
+ 3
Y.K. thank you
20th Apr 2018, 3:14 PM
Ukeme Wilson
Ukeme Wilson - avatar
+ 2
in css body{ background-image:url("yourimage"); }
20th Apr 2018, 3:03 PM
064XP
064XP - avatar
+ 2
Faisal thank you. now I get it
20th Apr 2018, 3:14 PM
Ukeme Wilson
Ukeme Wilson - avatar
+ 2
Your welcome Ukeme Wilson
20th Apr 2018, 3:19 PM
Bug Slayer