I want to position this red div element onto the bottom of a page, so I used this code:
div {
background-color: red;
width: 100px;
height: 100px;
position: relative;
top: 100vh;
}
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="master.css">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS</title>
</head>
<body>
<div></div>
</body>
</html>
Unfortunately, this positions the element onto the bottom of the page based on the top of the element, which makes you have to scroll down.
Can anybody help me get the desired result? Thank you.