My images links in css are not working ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

My images links in css are not working ??

I have to put images in background through css ..but it's not happening

28th Aug 2020, 11:29 AM
bhavna parmar
bhavna parmar - avatar
14 Answers
+ 7
Show! Demo: #tagname { background: url("https://www.namitisgreat.com/files/scenery.jpg") }
28th Aug 2020, 11:31 AM
Namit Jain
Namit Jain - avatar
+ 6
bhavna parmar the url is wrong 😌 It should end with .jpg or .png ig
28th Aug 2020, 11:48 AM
Namit Jain
Namit Jain - avatar
+ 5
Try this <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <img src=" https://i.postimg.cc/d1bbYRTP/images.jpg"width="350px"height="350px"> </body> </html>
28th Aug 2020, 12:36 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 4
AKSHAY 😌
28th Aug 2020, 11:42 AM
Namit Jain
Namit Jain - avatar
+ 4
bhavna parmar I cannot see any image link in your code
28th Aug 2020, 11:43 AM
Namit Jain
Namit Jain - avatar
+ 3
Namit Jain I thought you purchased a domain . LoL😂
28th Aug 2020, 11:41 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 3
You added background to class img1 but in html there is not any class with that name, thats why background image dont work
28th Aug 2020, 6:57 PM
PanicS
PanicS - avatar
+ 3
Me to
30th Aug 2020, 10:03 AM
ASHISH RAJ
ASHISH RAJ - avatar
+ 3
Cant
1st Sep 2020, 11:05 AM
ASHISH RAJ
ASHISH RAJ - avatar
28th Aug 2020, 11:42 AM
bhavna parmar
bhavna parmar - avatar
+ 1
In css ..it's there with .img1 , .img2
28th Aug 2020, 11:45 AM
bhavna parmar
bhavna parmar - avatar
+ 1
Your image should on same folder
29th Aug 2020, 3:29 PM
Ravi Jaiswal
Ravi Jaiswal - avatar
+ 1
Try it in computer
30th Aug 2020, 11:20 AM
Tommy
0
If your image is in the same folder as your html file then its okay. Otherwise you've to give proper source of the image.👍👍
30th Aug 2020, 2:49 AM
Rajnish Kush
Rajnish Kush - avatar