Background image in white

1

I'm having a problem with html, because I need to add an image to the bottom of a container and I'm using bootstrap, I've already tried adding the class to a separate css, but it still does not 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>
    
asked by anonymous 07.07.2018 / 15:19

1 answer

0

Rick I believe the problem as I mentioned in the comment is that you are missing a "." in the path of your directory to the image folder. Changed from ./ to ../ In this response you can read more about it if you are interested Access path for html, css, php etc folders

If the image is a folder "outside" the folder where your .css file is. you should do so: "../" before the folder name:

background-image: url(../imagem/bg.jpg);

Another note is that you do not need to put quotation marks around the path within url() although some consider this a good practice.     

07.07.2018 / 17:19