A
A
artem2020-06-09 14:48:45
css
artem, 2020-06-09 14:48:45

Why is the picture not showing up?

Here is the code:

.href14 {
  background-image: url("file:///C:/Users/artemqq/Desktop/rtyhj.png");
  height: 32px;
  width: 32px;
  display: block;
}

does not want to be displayed, although another picture (not PNG) is displayed. What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Sharomet, 2020-06-09
@arteqrt

You specify a path relative to your computer.
If this code is uploaded to the server, then it will not find this picture. Or Depends on the structure of the site.
background-image: url("rtyhj.png");
background-image: url("../rtyhj.png");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question