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

193
Views
Simple HTML CSS code to ReactJS Conversion

I am new to ReactJS. I want help in converting the following simple HTML/CSS code into ReactJS. I want to have 3 CSS cards on my website with 2 places on top row and 1 in the center. Please help.

.card {
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  transition: 0.3s;
  width:40%;
  height: 30%;
}

.card:hover {
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}

.container {
  padding: 2px 16px;
}
<h2>Card</h2>

<div style="display: flex; justify-content: space-between; margin-top:100px; margin-right:150px; margin-left: 150px">
  <div class="card">
    <a href="https://www.google.com"><img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar"
        style="width:100%"></a>
  </div>

  <div class="card">
    <img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar" style="width:100%">
  </div>

</div>

<div style="display: flex; justify-content: center; margin-top:100px; margin-right:150px; margin-left: 150px">
  <div class="card">
    <a href="https://www.google.com"><img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar"
        style="width:100%"></a>
  </div>
</div>

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

0

Technically you can make a React website which looks like the way you want it. For this you have to create a card component in ReactJs and you can write jsx for the above HTML and css will be the same. just import it in your component. Your card component will look something like this:

import React from 'react';
import './styles.css';

function card() {
  return (
    <div>
      <h2>Card</h2>

      <div style={{display: flex; justifyContent: spaceBetween; marginTop:100px; marginRight:150px; marginLeft: 150px}}>
        <div className="card">
          <a href="https://www.google.com"><img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar"
              style="width:100%"/></a>
        </div>

        <div className="card">
          <img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar" style="width:100%"/>
        </div>

      </div>

      <div style={{display: flex; justifyContent: center; marginTop:100px; marginRight:150px; marginLeft: 150px}}>
        <div className="card">
          <a href="https://www.google.com"><img src="https://wallpaperaccess.com/full/3856041.jpg" alt="Avatar"
              style={{width:100%}}/></a>
        </div>
      </div>
    </div>
  )
}

export default card;

save your css in the same folder.

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!