Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

145
Visualizações
Place footer at the bottom of a web page in React app

I am new in reactjs. I tried many solutions, but can't fix my footer to show at the bottom of the web page after displaying the web content. In this scenario, if web page has less content, footer is sitting right after end of the web content, instead of sitting at bottom. Moreover, I also tried with position:fixed, which practically shows the footer always stick at the bottom of the page, and sometime, some of the contents got hide back of the footer if web page is long. Can you guys please help me to get rid of this issue.

function App() {
  return (
    <div className="App">
      <Header></Header>
      <Routes>
        <Route path="/" element={<Home></Home>}></Route>
        <Route path="/home" element={<Home></Home>}></Route>
        <Route path="/blogs" element={<Blogs></Blogs>}></Route>
        <Route path="/login" element={<Login></Login>}></Route>
        <Route path="/register" element={<Register></Register>}></Route>
        <Route path="*" element={<NotFound></NotFound>}></Route>
       
      <Footer></Footer>
    </div>
  );
}
.footer {
    background-color: #758283;
    color: white;
    position: relative;

    display: flex;
    justify-content: space-between;
    padding: 20px 40px;

    bottom: 0;
}

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

It is discouraged to use uppercase letters in class names. I am going to use app instead of App.

  1. Add main class to the main content
  2. Make app a flex container:
.app {
  display: flex;
  flex-flow: column nowrap;
  height: 100vh; // or the minimum height of your content
}

.main {
  flex-grow: 1;
}

That will make the center content grow to fill the rest of the screen, pushing the footer to the bottom.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda