Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Footer blocking button

I have a footer that’s fixed to the bottom of the page but when I get to the bottom it blocks a button. How do I go about fixing this issue?

Footer.jsx

import "./Footer.css";

const Footer = () => {
  return (
    <footer>
      <p>Copyright © 2022</p>{" "}
    </footer>
  );
};

export default Footer;

Footer.css

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

footer {
  position: fixed;
  bottom: 0;
  font-size: 1.2rem;
  left: 0;
  padding: 1rem;
  text-align: center;
  width: 100%;
}

>Solution :

Try this

footer {
  position: static;
  bottom: 0;
  font-size: 1.2rem;
  left: 0;
  padding: 1rem;
  text-align: center;
  width: 100%;
}


Analysis

You made position: fixed for the footer, so anything which goes behind that will gets hidden. Instead, for the footer, we can use position: static so that the footer will position itself with the flow.

For more info – position at mdn

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading