Well, I have this css code for Login. What happens is that there must be some error because I get a huge space at the bottom of the screen.
Ileaveyouwithmycode
<style>/*Full-widthinputfields*/input[type=text],input[type=password]{width:100%;padding:12px20px;margin:8px0;display:inline-block;border:1pxsolid#ccc;box-sizing:border-box;}.inicioenter{position:absolute;left:35%;top:35%}/*Setastyleforallbuttons*/button{background-color:#4CAF50;color:white;padding:14px20px;margin:8px0;border:none;cursor:pointer;width:100%;}button:hover{opacity:0.8;}/*Centertheimageandpositiontheclosebutton*/.imgcontainer{text-align:center;margin:24px012px0;position:relative;}img.avatar{width:20%;border-radius:20%;}.container{padding:13px;}span.psw{float:right;padding-top:16px;}/*TheModal(background)*/.modal{display:none;/*Hiddenbydefault*/position:fixed;/*Stayinplace*/z-index:1;/*Sitontop*/left:0;top:0;width:100%;/*Fullwidth*/height:100%;/*Fullheight*/overflow:auto;/*Enablescrollifneeded*/background-color:rgb(0,0,0);/*Fallbackcolor*/background-color:rgba(0,0,0,0.4);/*Blackw/opacity*/padding-top:30px;}/*ModalContent/Box*/.modal-content{background-color:#fefefe;margin:5%auto15%auto;/*5%fromthetop,15%fromthebottomandcentered*/border:1pxsolid#888;width:50%;/*Couldbemoreorless,dependingonscreensize*/}/*TheCloseButton(x)*/.close{position:absolute;right:25px;top:0;color:#000;font-size:35px;font-weight:bold;}.close:hover,.close:focus{color:red;cursor:pointer;}/*AddZoomAnimation*/.animate{-webkit-animation:animatezoom0.6s;animation:animatezoom0.6s}@-webkit-keyframesanimatezoom{from{-webkit-transform:scale(0)}to{-webkit-transform:scale(1)}}@keyframesanimatezoom{from{transform:scale(0)}to{transform:scale(1)}}/*Changestylesforspanandcancelbuttononextrasmallscreens*/@mediascreenand(max-width:300px){span.psw{display:block;float:none;}.cancelbtn{width:100%;}}</style>
TheHTMLI'musing:
<body><divclass="inicioenter">
<center><h2>Iniciar Sessão</h2>
<button onclick="document.getElementById('boxmodal').style.display='block'" style="width:auto;">Entrar</button></center>
</div>
<div id="boxmodal" class="modal">
<form class="modal-content animate" method="post">
<div class="imgcontainer">
<span onclick="document.getElementById('boxmodal').style.display='none'" class="close" title="Close Modal">×</span>
<img src="img\profile-image.png" alt="Avatar" class="avatar">
</div>
<div class="container">
<label for="uname" class="center-align"><b>Username</b></label>
<input id="username" type="text" name="username" class="validate" autocomplete="off" required>
<label for="password" class="center-align"><b>Password</b></label>
<input id="password" type="password" class="validate" name="password" autocomplete="off" required>
<div class="container2">
<input type="submit" name="signin" value="Entrar" class="btn waves-effect waves-light">
</div>
</div>
</form>
</div>
<!-- Abrir caixa de Login -->
<script>
// Get the modal
var modal = document.getElementById('boxmodal');
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script><scripttype="text/javascript" src="js/materialize.min.js"></script>
</body>
</html>