0

Im trying to insert an image with css, the problem is that it works whit http images from the internet , but when i use my local images with the right path is not working.

btw I have the images in the same folder of the html file. also using right click copy path from visual code.

here is the css:

.cuerpo{
    background-image:url(""); 
    height: 100vh;
    background-size: bottom;
    display:flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

}

2 Answers2

0

If its on the same folder, try this solution.

.cuerpo{
    background-image:url("filename.extension"); 
    height: 100px;
    background-size: bottom;
    display:flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

So, you only write the filename.extension there.

Aethereal
  • 183
  • 1
  • 10
0

If you have your images in the same folder as the .html files, then you should specify only the image name. For example background-image: url('image.jpg')

marco marco
  • 147
  • 8