Why I cannot load picture when connecting to css?

why then not over the picture on the page on the local host59d7f862e3a67206524385.png
in the code the error it seems not, but on Vera if I'm wrong

 <div class="container">
 <div class="top">
sd
</div>
 <div class="middle">

</div>
 <div class="bottom">

</div>
</div>


.container{
 background-color: black;
}
.top{
 background-image: url(images/WKR8byV.png);
}
June 14th 19 at 18:58
2 answers
June 14th 19 at 19:00
Solution
Note that the relative links is the directory where this .css file, not from the current page index.html or etc
Ie if you have a structure
site
-images(folder)
--WKR8byV.png
-index.html
-styles(folder)
--style.css
you need to write background-image: url(../images/WKR8byV.png);
tried, but not helped - Winona commented on June 14th 19 at 19:03
Maybe you have a more complicated folder structure, or folder of Images is called a girlfriend or picture has a different name or extension. - Alene56 commented on June 14th 19 at 19:06
no, as you described above - Winona commented on June 14th 19 at 19:09
may you and css incorrectly connected? - Alene56 commented on June 14th 19 at 19:12
,
<link rel="stylesheet" href="css/styles.css" type="text/css">
background I did for checking whether a css - Winona commented on June 14th 19 at 19:15
Select the element in the inspector, right click on the link in the background-image properties -> Open in Source Panel if you open this picture then the problem lies elsewhere, if not opens then the problem is in the link - Alene56 commented on June 14th 19 at 19:18
the picture is loaded - Winona commented on June 14th 19 at 19:21
what else could it be? - Winona commented on June 14th 19 at 19:24
Maybe it's a small item that you can't see the picture, maybe a bug in the class name, try a container to remove background-color from .top add background-size:100% 100%; Try this background-image to body throw, there should be standards to work. - Alene56 commented on June 14th 19 at 19:27
well even if you do not have to remove the container background of the picture was loaded, but loaded correctly, so what was the problem then? I understand too little field where pokazhetsja the picture so could not see? - Winona commented on June 14th 19 at 19:30
very strange, because in the screenshot of 404 error - Florence_Medhurst commented on June 14th 19 at 19:33
the problem in the area in which it is loaded, so I removed your team and just using <br> - increased top and it was loaded - Winona commented on June 14th 19 at 19:36
very weird, because the 404 error "Not found". This means that the browser cannot get the file (sees it) - Florence_Medhurst commented on June 14th 19 at 19:39
Yes that's an old screenshot, it has long been fixed - Alene56 commented on June 14th 19 at 19:42
already see, I don't know why this tag helps to remove the problem)) - Winona commented on June 14th 19 at 19:45
, weird thing is if to go back to the previous state then the 404 error does not appear, the picture is not loaded, ie for dimensions not appearing - Winona commented on June 14th 19 at 19:48
you gave all the code or is there? Which server do you use? - gustave_Kertzmann52 commented on June 14th 19 at 19:51
open server the whole code, the problem is still in the picture, it was too big, I reduced to 100на100 px and everything loaded as it should, although the 404 error I do not know why - Winona commented on June 14th 19 at 19:54
and can a picture throw? An interesting case to test want.

This server? - gustave_Kertzmann52 commented on June 14th 19 at 19:57
, do not know what screen you lose so did everyone else)) 59d814ce029a6988232763.png - Winona commented on June 14th 19 at 20:00
not-not-not, thank you certainly for the time, but I needed just a picture, the image file to download the server to push to your code, your image, and zatestit case. - gustave_Kertzmann52 commented on June 14th 19 at 20:03
59d81c0331228334555225.png59d81c08d0890550805509.png - Winona commented on June 14th 19 at 20:06
lower is that the first time I shoved, a little is already a smaller version)) - Winona commented on June 14th 19 at 20:09
June 14th 19 at 19:02
First, try to enclose the path in single quotation marks.
background-image: url('../images/WKR8byV.png');

Second, the web server is configured correctly?
not decided - Winona commented on June 14th 19 at 19:05
the web server is configured correctly? - Alene56 commented on June 14th 19 at 19:08
under right it's like? - Winona commented on June 14th 19 at 19:11
picture exactly why it is not loading, if you connect for example to the body all works - Alene56 commented on June 14th 19 at 19:14
try using background instead of background-image - Winona commented on June 14th 19 at 19:17
so I'm using background-image and connect, but the problem is partially solved in the comments above - Alene56 commented on June 14th 19 at 19:20

Find more questions by tags HTMLCSS