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

205
Visualizações
How to change whole layout of a div without refreshing the page

So, I'm doing a project on React and I have this div tag which is a container that consists of information portrayed in this first image. Then what I would like to do is within that div without having the page refreshed change the display into this second image. It is like a card stacking on each other. I have no idea what keywords to search on google so I couldn't find any examples to do this.

Here's my html and css code for my div in the first image.

HTML

<div className={styles.showTicketBox}>
   <div className={styles.showTicketBox1}>
      <div className={styles.userEligibleTickets}>
         <p>Your Eligible Tickets</p>
         <h3 style={tokenContent}>0 Ticket(s)</h3>
      </div>
      <div className={styles.userDepositedTickets}>
         <p>Your Deposited Tickets</p>
         <h3 style={tokenContent}>0 Ticket(s)</h3>
      </div>
   </div>
   <div className={styles.showTicketBox2}>
      <div className={styles.userWinningTickets}>
         <p>Your Winning Tickets</p>
         <h3 style={tokenContent}>0 Ticket(s)</h3>
      </div>
      <div className={styles.userTicketsAllo}>
         <p>Your Allocation</p>
         <h3 style={tokenContent}>0 SHI</h3>
      </div>
   </div>
</div>

CSS

.showTicketBox{
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 20px;
    margin-top: 2em;
    .showTicketBox1{
        width: auto;
        height:auto;
        display: inline-block;
    }
    
    .showTicketBox2{
        width: auto;
        height:auto;
        position: relative;
        display: inline-block;
    }
}
about 4 years ago · Juan Pablo Isaza
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