Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!