How can I move the footer to the bottom of the page?
My HTML code is
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Website</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<header id="main-header">
<div class="container">
<h1>My Website</h1>
</div>
</header>
<nav id="navbar">
<div class="container">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</nav>
<section id="showcase">
<div class="container">
<h1>
Lorem ipsum dolor sit amet consectetur adipisicing elit. A vel tenetur natus, reiciendis impedit sint assumenda incidunt dignissimos. Aliquid at, vitae molestiae quia quod saepe ipsam corporis eius? Et, quae.
</h1>
</div>
</section>
<div>
<section id="main">
<h1>Welcome</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptate sit a soluta cumque non aspernatur optio, eius itaque, reprehenderit maiores fugit error, nesciunt impedit ullam. Asperiores enim nostrum magni numquam!
</p>
</section>
<aside id="sidebar">
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptate sit a soluta cumque non aspernatur optio, eius itaque, reprehenderit maiores fugit error,
</p>
</aside>
</div>
<footer id="main-footer">
<p>Copyright ©2018 My Website</p>
</footer>
</body>
</html>
My CSS code is
body{
background-color: #f4f4f4;
color: #555;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
line-height: 1.6em;
margin:0;
}
.container{
width:80%;
margin: auto;
overflow: hidden;
}
#main-header{
background-color: coral;
color: #fff;
}
#navbar{
background-color: #333;
color: #fff;
}
#navbar ul{
padding:0;
list-style: none;
}
#navbar li{
display:inline;
}
#navbar a{
color:#fff;
text-decoration: none;
font-size: 18x;
padding-right: 15px;
}
#showcase{
background-image:url('../images/bgimage.jpeg');
background-position: center right;
min-height: 300px;
margin-bottom: 30px;
text-align: center;
}
#showcase h1{
color:#fff;
font-size: 50px;
line-height: 1.6em;
padding-top: 30px;
}
#main{
float:left;
width:70%;
padding: 0 30px;
box-sizing:border-box;
}
#sidebar{
float:right;
width: 30%;
background: #333;
color: #fff;
padding: 10px;
box-sizing: border-box;
}
#main-footer{
background: #333;
color: #fff;
text-align: center;
padding: 20px;
margin-top: 40px;
}