1
How can I leave the below modal responsive according to the monitor resolution(15" ~ 21"), if I add width & height for 21" monitors it looks good, but if I play in notebook(15") is overlapping the entire screen.. I couldn’t find a way to fix
<div class="modal fade" style="position: absolute;" id="exampleModalLong" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle" style="text-align: center;">Detalhes do Pedido</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<h2 style="text-align:left; margin-top: 0px;">Endereço de Entrega</h2>
<br />
<label>Endereço:</label>
<label id="lblEndereco" style="color:cornflowerblue; font-size: 15.5px; margin-left: 10px;"></label>
<label style="margin-left: 250px;">Bairro:</label>
<label id="lblBairro" style="color:cornflowerblue; font-size: 15.5px; margin-left: 10px;"></label>
<label style="margin-left: 200px;">Cidade:</label>
<label id="lblCidade" style="color:cornflowerblue; font-size: 15.5px; margin-left: 10px;"></label>
<label style="margin-left: 115px">UF:</label>
<label id="lblUF" style="color:cornflowerblue; font-size: 15.5px; margin-left: 10px;"></label>
<hr />
<h2 style="text-align:left; margin-top: 0px;">Produtos</h2>
<div id="table-wrapper">
<div id="table-scroll">
<style>
#table-wrapper {
position: relative;
}
#table-scroll {
height: 150px;
overflow: auto;
margin-top: 20px;
}
#table-wrapper table {
width: 100%;
}
#table-wrapper table * {
color: black;
}
#table-wrapper table thead th .text {
position: absolute;
top: -20px;
z-index: 2;
height: 20px;
width: 35%;
border: 1px solid red;
}
</style>
<table class="table table-hover" id="itens">
<thead>
<tr>
<th scope="col">Código</th>
<th scope="col">Descrição</th>
<th scope="col">Quantidade</th>
<th scope="col">Pontos</th>
<th scope="col">Preço</th>
<th scope="col">Desconto</th>
<th scope="col">Total</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
</div>
<hr />
<h2 style="text-align:left; margin-top: 0px;">Totais</h2>
<br />
<br>
<label>Total Produtos:</label>
<label id="lblTotalProdutos" style="color:cornflowerblue; font-size: 15.5px; margin-left: 10px;">R$ </label>
<label style="margin-left: 100px;">Total Frete:</label>
<label id="lblTotalFrete" style="color:cornflowerblue; font-size: 15.5px; margin-left: 10px;">R$ </label>
<label style="margin-left: 180px;">Total Desconto:</label>
<label id="lblDesconto" style="color:cornflowerblue; font-size: 15.5px; margin-left: 10px;">R$ </label>
<label style="margin-left: 180px">Total Pedido:</label>
<label id="lblTotalPedido" style="color:cornflowerblue; font-size: 15.5px; margin-left: 10px;">R$ </label>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
Tried media queries??
– LeAndrade
https://www.w3schools.com/css/css_rwd_mediaqueries.asp
– Sveen