I created a simple footer using CSS and Bootstrap. It seems to be working fine on most pages, but I'm facing an issue where on pages with minimal content, the footer appears at the end of the content rather than the bottom of the page.
I've spent quite some time trying to troubleshoot this problem, but so far, I haven't been able to find a solution.
.footer {
position: relative;
bottom: 0;
width: 100%;
height: 150px;
background:#dfdfdf;
}
.body-tag {
height: 100%;
background: #F6F6F6;
color: #333333;
margin-top: 5rem;
padding-bottom: 4rem;
}
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="583a37372c2b2c2a3928186d7668766a">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<body class="body-tag">
<div class="footer fixed-bottom">
<div class="container">
<footer class="py-3 my-4">
<ul class="nav justify-content-center border-bottom pb-3 mb-3">
<li class="nav-item"><a href="#" class="nav-link px-2 footer-text">Home</a></li>
<li class="nav-item"><a href="#" class="nav-link px-2 footer-text">Features</a></li>
<li class="nav-item"><a href="#" class="nav-link px-2 footer-text">Pricing</a></li>
<li class="nav-item"><a href="#" class="nav-link px-2 footer-text">FAQs</a></li>
<li class="nav-item"><a href="#" class="nav-link px-2 footer-text">About</a></li>
</ul>
<p class="text-center footer-text">© name, Inc</p>
</footer>
</div>
</div>
</body>