How to put a button on top of an image?

0

I have the following image below:

<div id="exampleModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered" role="document">
    <div class="modal-content">

      <img src="https://progetex.com.br/uf/popup1.png"style="max-width:100%"/>

    </div>
  </div>
</div>

IneedtoputabuttonontopofitusingCSS,likethis:

But I can not use the background image of the div because I need the dimensions of it (when I used it as a background, the div did not appear since it had no content inside).

Any tips?

    
asked by anonymous 12.06.2018 / 04:25

1 answer

2

As discussed in the comments, place the button with position: absolute; :

botao{
   position: absolute;
   left: VALORpx;
   bottom: VALORpx
}

Replace "VALUE" with numbers where the button is in the desired position. Also change the "button" selector by id , class or element tag.

    
12.06.2018 / 04:49