Struggling to keep my footer at the bottom of the page when there is minimal content. I attempted using:
position:absolute;
and
bottom:0;
It appears to stay in place, but when more content is added, it ends up going "under" the footer that remains near the center of the page.
When I say "under," I mean the text flows beneath the footer and overlaps with it. If necessary, I can provide images showcasing the issue. Thank you for your time!
This is the HTML code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/src/app/footer/footer.component.css"> <!--import css footer-->
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css">
</head>
<body>
<footer class="footer">
<div class="flex-wrapper">
<div class="container">
<div class="row">
<div class="footer-col">
<div class="content">
<a href="#"> <img src="https://i.imgur.com/1yvwx9I.png" ></a>
</div>
</div>
<div class="footer-col">
<h4>Company</h4>
<ul>
<li><a href="about-us">About Us</a></li>
<li><a href="contact">Contact Us</a></li>
<li><a href="#">Placeholder</a></li>
<li><a href="#">PlaceHolder</a></li>
</ul>
</div>
<div class="footer-col">
<h4>Help</h4>
<ul>
<li><a href="faq">FAQ</a></li>
<li><a href="deliveries">Deliveries</a></li>
<li><a href="return-policy">Return Policy</a></li>
<li><a href="privacy-policy">Privacy Policy</a></li>
</ul>
</div>
<div class="footer-col">
<h4>Follow Us</h4>
<div class="social-links">
<a href="facebook"><i class="fab fa-facebook-f"></i></a>
<a href="twitter"><i class="fab fa-twitter"></i></a>
<a href="instagram"><i class="fab fa-instagram"></i></a>
<a href="linkedin"><i class="fab fa-linkedin-in"></i></a>
</div>
</div>
</div>
</div>
</div>
</footer>
</body>
</html>
This is the CSS code
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
body {
line-height: 1;
font-family: 'Poppins', sans-serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Rest of the CSS styles remain unchanged */
Here's the result when adding bottom:0px;
: