-2

am not able to keep footer at the bottom, I found a way online i.e to keep its css position as fixed. However, if I keep it fixed it is at bottom but over the actual content. How to solve this and have to footer at the bottom like real sites have?

If not possible with CSS then maybe bootstrap?

Jack
  • 1

1 Answers1

0

Fast answer:

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.footer {
   position: fixed;
   left: 0;
   bottom: 0;
   width: 100%;
   background-color: red;
   color: white;
   text-align: center;
}
</style>
</head>
<body>

<h2>Fixed/Sticky Footer Example</h2>
<p>The footer is placed at the bottom of the page.</p>

<div class="footer">
  <p>Footer</p>
</div>

</body>
</html> 

Internet is full with things you need: https://www.w3schools.com/howto/howto_css_fixed_footer.asp

This is what you want: https://css-tricks.com/couple-takes-sticky-footer/

Ingus
  • 1,026
  • 12
  • 34
  • I used the code from the same site you mentioned. When there is content on the page and user has to scroll the footer is not at the bottom it overlaps the content. – Jack Dec 23 '19 at 13:53
  • This page i for you: https://css-tricks.com/couple-takes-sticky-footer/ – Ingus Dec 23 '19 at 14:01