I've looked for quite a while on google, but I can't seem to find a straight answer on how to center a button on the page in height, relative to the page's height. I can do this with width using the style "margin: 0 auto;" Is there a similar way to do this for height?
p.s. password's 1234
/* Login */
function enter() {
var pass = prompt("Enter the Password");
{
if (pass == "1234")
{
alert("Correct");
location.href="Page2.html"
}
else
{
if (pass == null)
{
throw '';
}
else
{
alert("Incorrect");
}
}}}
/* Body Styles */
body {
background-color: #00C5CD;
}
/* Defining Fonts */
@font-face {
font-family: "CinnabarBrush";
src: url("CinnabarBrush.ttf");
}
/* Button Styles */
button#enter {
background-color: #FF4444;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
display: block;
font-size: 16px;
margin: 0 auto;
display: block;
}
/* Header1 (title) Styles */
h1#title {
font-size: 50pt;
color: #fff;
font-family: "CinnabarBrush";
height: auto;
text-align: center;
text-shadow:
-5px -5px 0 #000,
5px -5px 0 #000,
-5px 5px 0 #000,
5px 5px 0 #000;
<!DOCTYPE html>
<html>
<head>
<title>Cinnabar Web</title>
<link rel="stylesheet" href="CSS.css">
<script src="JavaScript.js"></script>
</head>
<body>
<h1 id="title">Cinnabar Web</h1>
<button id="enter" onclick="enter()">Enter</button>
</body>
</html>