I have the following structure at the moment:
Sofarsogood,thesidemenuhasheight:100%
andisgoingallthewaytothebottomofthepage.Incontent,wehave8inputs
whicharenotenoughtogettothebottomofthepage,sothemenuisnormalandnoscrollbarappears(becauseitisnotnecessaryatthemoment).
Nowinthefollowingstructure:
Inthepreviousstructure,wehave14inputs
(andstilllower)andnowareenoughtoreachthebottomofthepageandcreatethescrollbar,butthesidemenucontainingheight:100%
doesnotmatchthesizeofthediv
containinginputs
.
Iwantedthesidemenutogotothebottomofthepage,trackingthesizeofthediv
withtheinputs.Itdoesnotmatterifthediv
withinputs
has500px
heightor3000px
heightor10000px
height,thesidemenushouldaccompanythesize,howcouldImakeitfollow?>
MenuCSS:
.longBarVertical{width:180px;min-height:100%;background-color:rgb(34,34,50);float:left;}.logoMenu{margin-top:15px;}.logoMenuimg{width:50px;}.menuVertical{position:relative;width:180px;padding:0px;margin-top:15px;}.menuVerticallia{padding-left:15px;line-height:45px;display:block;overflow:hidden;position:relative;text-decoration:none;color:rgb(225,225,225);border-left:5pxsolidtransparent;}
MenuHTML:
<!DOCTYPEhtml><html><head></head><body><divclass="longBarVertical">
<div class="logoMenu text-center">
<a href="home.php"><img src="img/atom-logo.png"></a>
</div>
<ul class="menuVertical">
<li>
<a href="#" data-toggle="collapse" data-target="#submenu-1">
<i class="fa fa-file-text-o"></i><span>Geradores</span>
</a>
</li>
<div class="submenu">
<ul id="submenu-1" class="collapse">
<li><a href="genMC.php"><i class="fa fa-plus"></i><span> Model/Controller</span></a></li>
<li><a href="genSenha.php"><i class="fa fa-minus"></i><span> Senha</span></a></li>
</ul>
</div>
<li>
<a href="#" data-toggle="modal" data-target="#deslogar">
<i class="fa fa-sign-out"></i><span>Sair</span>
</a>
</li>
</ul>
</div>
<div class="modal fade" id="deslogar" role="dialog">
<div class="modal-dialog modal-md" style="width: 210px; text-align: center;">
<div class="modal-content">
<div class="modal-body" style="padding-bottom: 0px;">
<p>Sair?</p>
</div>
<div class="modal-footer" style="padding-top: 5px; padding-bottom: 5px; text-align: center;">
<a href="../controller/controller.deslogar.php" type="button" class="btn btn-success" style="width: 80px;">Sim</a>
<a href="#" type="button" type="button" class="btn btn-danger" data-dismiss="modal" style="width: 80px;">Não</a>
</div>
</div>
</div>
</div>
</body>
</html>
CSS Page (which has the inputs):
.row .page {
width: 90%;
}
.row .page .title {
color: gray;
margin-top: 30px;
margin-left: 30px;
}
.row .page .content {
margin-top: 30px;
margin-left: 30px;
}
.row .page .content label{
color: #333;
}
HTML page (which has the inputs):
<body>
<div class="row no-gutters">
<div class="page">
<div class="title">
<h3>Gerador de Model e Controller</h3>
<hr>
</div>
<div class="content">
<div class="row">
<div class="col-xl-4">
<div class="form-group">
<label for="nomeTabela">Nome da Tabela:</label>
<input type="text" class="form-control" name="nomeTabela" placeholder="Nome da Tabela">
</div>
</div>
<div class="col-xl-8">
<div>
<div class="form-group text-center" style="width: 68%; float: left;">
<label for="nomeColunas"><b>Nome das Colunas</b></label>
<input type="text" class="form-control" name="colunas[]" placeholder="Nome das Colunas">
<?php
for ($i=0; $i < 15; $i++) {
echo '<input type="text" class="form-control" name="colunas[]" placeholder="Nome das Colunas" style="margin-top: 5px;">';
}
?>
</div>
<div class="text-center" style="width: 30%; float: right;">
<label for="tipoTransfMIA"><b>Adicionar - Remover</b></label>
<a id="add" class="pull-left btn btn-success" style="width: 49%;"><i class="fa fa-plus"></i></a>
<a id="del" class="pull-right btn btn-danger" style="width: 49%;"><i class="fa fa-minus"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
Note: I'm using the Bootstrap 4
framework.