1#footer {
2 position:fixed;
3 left:0px;
4 bottom:0px;
5 height:30px;
6 width:100%;
7 background:#999;
8}
9
10//name footer id="footer"
1#page-container {
2 position: relative;
3 min-height: 100vh;
4}
5
6#content-wrap {
7 padding-bottom: 2.5rem; /* Footer height */
8}
9
10#footer {
11 position: absolute;
12 bottom: 0;
13 width: 100%;
14 height: 2.5rem; /* Footer height */
15}
1<html>
2<title>Set footer bottom</title>
3<body>
4<footer style = "position: absolute;bottom: 0;">copyright @2021</footer>
5</body>
6</html>
1<!DOCTYPE html>
2
3<html>
4 <head>
5 <link rel="stylesheet" type="text/css" href="main.css" />
6 </head>
7
8<body>
9 <div id="page-container">
10 <div id="content-wrap">
11 <!-- all other page content -->
12 </div>
13 <footer id="footer"></footer>
14 </div>
15</body>
16
17</html>