I have in my system a situation similar to the one I gave as an example. A modal bootstrap that can open at any location on the screen. This mode does not occupy the entire screen. Within this modal, some records are listed, depending on the context. In this modal, I have a div with the record maintenance buttons (edit, delete, include, etc ...). I would like this div with the buttons to always be in the lower right corner of the modal, fixed (because the modal is scrollable, depending on the amount of records), but I can not do it. I already tried to put position: fixed
and a margin-left
calculated on the hour, but it did not work as I wanted.
.botoes-modal{
width: 120px;
height: 40px;
background-color: green;
}
<div style="overflow-y: auto; height: 200px;">
<table>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
<tr><td>teste</td><td>teste</td></tr>
</table>
<div id="botoes-acao" class="botoes-modal">
Clique para editar
</div>
</div>