how to put image in background | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

how to put image in background

my image is not saved in that folder where html file.so how i put image in background in that app learn html?plzz give me solution

25th Jun 2016, 1:34 AM
dhananjay sharma
6 Respuestas
+ 6
Here's an example tested in the Playground : <!DOCTYPE html> <html> <head> <title>Page Title</title> <style> div { width: 245px; height: 160px; color: #fff; background: url('http://i.imgur.com/cR3K2lM.gif') } </style> </head> <body> <div><h2>RUN!</h2></div> </body> </html>
25th Jun 2016, 2:49 AM
ZinC
ZinC - avatar
+ 2
This app doesn't have permission to access your images. Upload to the Internet then use full url in your css code. You can host images at imgur.com.
25th Jun 2016, 2:28 AM
ZinC
ZinC - avatar
+ 1
in Css... background:url(image.format); image and Format are Variables..
25th Jun 2016, 4:40 AM
Muzammal Ashfaq
Muzammal Ashfaq - avatar
0
in HTML. use body tag <body background="img1.jpg"></body>
28th Jun 2016, 4:51 AM
N.Adityavardhan
N.Adityavardhan - avatar
0
use css
29th Jun 2016, 4:06 PM
sagir
sagir - avatar
0
use background:url(""); with corresponding html div
19th May 2017, 12:02 PM
N.Adityavardhan
N.Adityavardhan - avatar