2
I want to add an image as the background of a div, and for this, I am using the following code:
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="imagemDeFundo">
<p>Hello world</p>
</div>
</div>
</div>
</div>
In my CSS it’s like this:
.imagemDeFundo{
background-image: url(imgs/backgroundpage.png);
width: 400px;
height: 400px;
}
My image isn’t showing. What I’m doing wrong?
Probably the path to the image file. Remember that it is relative to the location of the file . CSS and not . HTML.
– Allan Andrade
the path of your photo is right ?
– user55410