1
I’m having a problem with html, because I need to add an image in the background of a container and I’m using bootstrap, I tried to add the class in a separate css, but it still doesn’t work
.bg-back{
background-color: transparent;
background-image: url("./imagem/bg.jpg");
}
<main>
<section class="bg-back">
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div class="container" align="center">
<div class="input-group col-lg-6">
<input type="text" class="form-control" placeholder="">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Pesquisar</button>
</span>
</div>
</div>
<br>
<br>
<br>
<br>
</section>
</main>
Rick take the quotes on
background-image
thus:url(./imagem/bg.jpg)
if it still doesn’t work is because the path to your folder is wrong, then you can try to put a " . " more at the beginning of the path, if the image is a folder "outside" of the folder where your file is.css
. thus: " ../ "background-image: url(../imagem/bg.jpg);
– hugocsl
@hugocsl worked, answers the topic to put your answer with right. Thank you.
– Rickafds
Thanks Rick I’ll do it, thanks for the force!
– hugocsl