How to keep footer at bottom of page and centered with html & css?

Ask a question
2

My footer won’t stay centered or at the bottom of the page. It’s either on the side or middle of the page, interfering with my other content.

CSS:

footer {
  background-color: transparent;
  margin-top: -0.5em;
  padding: 2em;
  position: absolute; 
}

HTML:

<footer>
  &copy; Copyright 2019. All Rights Reserved.<br>
  <a href ="mailto:[email protected]">[email protected]</a>
</footer>
Coin iconoffer bounty
add comment

1 Answer

0
.footer {
   position: fixed;
   left: 0;
   bottom: 0;
   width: 100%;
   background-color: red;
   color: white;
   text-align: center;
}

choose color you want

add comment

Your Answer