0
Eae galera blz. I am in need of a help with the following effect. I have a button that when clicking it opens a list. But I want this list to take the entire screen. Except that when there is the problem, when opening it simply goes to the limit of the parent element, I can’t define the size that makes it cover every page (body), it is simply limited to the parent element, would have something to do to solve it ? I’m wearing the bootstrap. Edit: can do without the Fixed display? to not have the scroll bar.
<!DOCTYPE html>
<html lang="pt-br">
<head>
<!-- Meta tags Obrigatórias -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<title>Olá, mundo!</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-6">
<a class="btn btn-block nav-link" data-role="list">
<span>Open</span>
</a>
<ul class="list-unstyled bg-primary text-white" id="list">
<div class="row">
<div class="col-9">
<ul class="list-unstyled" id="list">
<li>
<h3>teste1</h3>
dassadasd dassadasd dassadasd dassadasd
</li>
<li>
<h3>teste1</h3>
dassadasd dassadasd dassadasd dassadasd
</li>
<li>
<h3>teste1</h3>
dassadasd dassadasd dassadasd dassadasd
</li>
</ul>
</div>
<div class="col-3">
<a class="btn btn-block pt-5 nav-link">Close</a>
</div>
</div>
</ul>
</div>
</div>
</div>
<script>
$("#list").hide();
$(document).ready(function() {
$(".nav-link").click(function() {
$("#list").toggle();
});
});
</script>
<!-- JavaScript (Opcional) -->
<!-- jQuery primeiro, depois Popper.js, depois Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</body>
</html>
"I can’t define the size that makes it cover every page" if you are inside another div and want to do this, wouldn’t it be better to open as a lightbox and occupy the whole screen? jquery has it ready
– Ricardo Pontual