I want to put a footer at the bottom of the page, which has quite large amount of data, but the footer should be over the content at the top layer:
<html><head>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
<style type="text/css">
.main{
height: 1430px;
background-color:red;
}
.bottom{
position: absolute;
bottom: 0px;
background-color:green;
}
</style>
</head>
<body>
<div class="main">main content
<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3<br>1<br>2<br>3
</div>
<div class="bottom">bottom</div>
Now my problem is, that if I scroll the page, the bottom keeps on its position where it was generated.
How do I keep it at the bottom with only CSS?