Css | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Css

Why doesn’t a picture appear on the page if I wrote everything correctly in css?

21st Feb 2019, 3:26 PM
Олег Кирсанов
Олег Кирсанов - avatar
15 Answers
+ 12
It will be easier to answer your question if you show your code.
21st Feb 2019, 3:56 PM
Nova
Nova - avatar
+ 12
Post your code here so we can help.
21st Feb 2019, 5:17 PM
Mitali
Mitali - avatar
+ 9
Use "file:///" then but note that only people that have this image in the same directory in their devices will be able to see it.
24th Feb 2019, 9:43 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 8
Is your image correct too?
21st Feb 2019, 4:08 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 4
I think you have to use relative paths rather than absolute paths...as some localhost may not accept absolute paths....
12th Apr 2019, 12:27 AM
Thanigai Velan
Thanigai Velan - avatar
+ 3
You are probably doing your code here on SL... Here,in case of code playground, you have to put the url from the ORIGINAL SOURCE... I.e. even after searching the image on Google, go to that image's SOURCE WEBSITE, and from there after clicking on the image.. copy paste the URL in your code. Hope it was helpful😊
21st Feb 2019, 4:53 PM
Nimit Sandeep Jhunjhunwala
Nimit Sandeep Jhunjhunwala - avatar
+ 2
<!DOCTYPE html> <head><title>Ethiopian Flag</title></head> <body> <svg width="620" height="320"> <rect width="600" height="100" x="20" y="20" fill="green" /> <rect width="600" height="100" x="20" y="120" fill="yellow" /> <rect width="600" height="100" x="20" y="220" fill="red" /> <circle cx="320" cy="170" r="100" fill="blue" /> <polyline style="stroke-linejoin:miter; stroke:yellow"; stroke-width:20; fill:blue" points="280 230, 320 90, 355 230,255 140,380 140,280 230" /> <line x1="290" y1="120" x2="270" y2="100" style="stroke:#ffff00; stroke-linecap:round; stroke-width:2" /> <line x1="370" y1="200" x2="350" y2="180" style="stroke:#ffff00; stroke-linecap:round; stroke-width:2" /> <line x1="260" y1="200" x2="280" y2="180" style="stroke:#ffff00; stroke-linecap:round; stroke-width:2" /> <line x1="345" y1="130" x2="375" y2="100" style="stroke:#ffff00; stroke-linecap:round; stroke-width:2" /> <line x1="32
21st Feb 2019, 5:19 PM
Geleta Hailemariam Jemjem
Geleta Hailemariam Jemjem - avatar
24th Feb 2019, 7:10 PM
Олег Кирсанов
Олег Кирсанов - avatar
+ 1
I want to insert a picture that is stored on my phone
24th Feb 2019, 7:11 PM
Олег Кирсанов
Олег Кирсанов - avatar
+ 1
Thanks!
25th Feb 2019, 1:51 PM
Олег Кирсанов
Олег Кирсанов - avatar
+ 1
It might be your path wrong Or publish your code so we can help you
30th Oct 2019, 12:16 PM
Master Genius [ INACTIVE ]
Master Genius [ INACTIVE ] - avatar
0
May be your path is not correct
24th Feb 2019, 11:05 AM
Divakar Singh
Divakar Singh - avatar
17th Feb 2020, 9:19 AM
**جابر ابراهيم**
**جابر ابراهيم** - avatar
0
Submit your code here I will solve your problem
6th Mar 2021, 1:03 AM
blocked
0
Maybe path is incorrect
1st Aug 2023, 11:16 AM
Saiyan Shaikh
Saiyan Shaikh - avatar