Can we add a .jpg file as background in html in Solo learn. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Can we add a .jpg file as background in html in Solo learn.

5th Aug 2017, 6:11 PM
Harsh Kumar
Harsh Kumar - avatar
9 Answers
+ 23
You can use only web address your IMG you can't use your local IMG, if you want to your own IMG in solo so you upload on any image hosting websites or use link.. thanks
5th Aug 2017, 7:40 PM
Saurav Saini
Saurav Saini - avatar
+ 6
yes, with code below html { background: url("your/path/to/image.jpg"); }
5th Aug 2017, 6:16 PM
Amethyst Animion
Amethyst Animion - avatar
+ 5
why not we can add.....cmon......do it....
10th Aug 2017, 1:01 AM
Ironman Pd
Ironman Pd - avatar
+ 4
see my code below for make a .jpg file as background of header. open CSS section, line 39 https://code.sololearn.com/WJLjkgXHRgAI/?ref=app
5th Aug 2017, 6:34 PM
Amethyst Animion
Amethyst Animion - avatar
+ 4
CHECK OUT MY WWE-SPECIAL CODE
10th Aug 2017, 12:56 AM
Ironman Pd
Ironman Pd - avatar
+ 2
code I give before is CSS code not HTML. try to write <body style="background-image:url('file:///storage/emulated/0/DCIM/Camera/IMG_20170610_112846.jpg'>
5th Aug 2017, 6:32 PM
Amethyst Animion
Amethyst Animion - avatar
+ 1
haha....lol
10th Aug 2017, 3:58 AM
Harsh Kumar
Harsh Kumar - avatar
+ 1
<!DOCTYPE html> <head> <link rel="stylesheet" type="text/css" href="/css/style.css" /> </head> <body> ... </body> </html> style.css body { background: url(/img/yourimg.jpg) [if need releat] repeat: repeat-x [or y] }
11th Aug 2017, 3:38 PM
Дмитрий
0
JFS Animion plz help as the code didn't work https://code.sololearn.com/WQNSu7ms7Yli/?ref=app
5th Aug 2017, 6:24 PM
Harsh Kumar
Harsh Kumar - avatar