Css | SoloLearn: Learn to code for FREE!

+5

Css

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

2/21/2019 3:26:01 PM

Олег Кирсанов

13 Answers

New Answer

+13

It will be easier to answer your question if you show your code.

+12

Post your code here so we can help.

+9

Is your image correct too?

+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.

+4

I think you have to use relative paths rather than absolute paths...as some localhost may not accept absolute paths....

+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😊

+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

+1

https://code.sololearn.com/Wsz4cXJcd2zb/?ref=app

+1

I want to insert a picture that is stored on my phone

+1

+1

It might be your path wrong Or publish your code so we can help you

0

May be your path is not correct

0

https://www.sololearn.com/discuss/2170427/?ref=app