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

151
Views
How to make image banner and two div cards responsive for every sreensize

I have an image banner with some text and buttons on top of it and two widgets right next to it in a flex (watch image for reference). I want them to be responsive when the screen changes sizes.

<div className="tabs">
          <div className="tabs-container">
            <img src={MainBG} alt="background" className="banner-img" />
            <div className="top-text">
              <div>
                <h1>
                  Track Crypto Activity <br /> For Smarter Trading
                </h1>
                <button className="join-button"> Join Now</button>
                <button className="academy-button"> Crypto Academy</button>
              </div>
            </div>
          </div>
          <div className="widgets">
            <TechnicalAnalysis
              colorTheme="dark"
              width="280"
              height="305"
              symbol="BITSTAMP:BTCUSD"
            />
            <TechnicalAnalysis
              colorTheme="dark"
              width="280"
              height="305"
              symbol="BINANCE:ETHUSDT"
            />
          </div>
          

How the Ui is on one screen size

Here is the current CSS:

.tabs {
  display: flex;
  overflow: scroll;
  width: 100%;
}
.banner-img {
  width: 95%;
}
.tabs-container {
  position: relative;
  margin-top: 20px;
  margin-left: 10px;
}

.top-text {
  position: absolute;
  margin-left: 30px;
  display: flex;
  justify-content: space-around;
  color: white;
  top: 50px;
}

.join-button {
  background-color: #bb46e2;
  cursor: pointer;
  color: white;
  padding: 10px;
  width: 90px;
  border-radius: 10px;
  border: none;
}

.academy-button {
  background-color: transparent;
  cursor: pointer;
  padding: 10px;
  border: 1px solid white;
  color: white;
  border-radius: 10px;
  margin-left: 15px;
}

.academy-button:hover {
  background-color: white;
  color: #bb46e2;
}

.widgets {
  display: flex;
  flex-direction: row;
  width: 50%;
  justify-content: space-between;
  margin-top: 20px;
  margin-right: 30px;
}

How do I make these responsive for all screen sizes?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use media queries. You can use those it change the styling of elements depending on the screen size. Read the documentation here.

about 4 years ago · Juan Pablo Isaza Report
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!