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

206
Visualizações
React JS: adding a flex style to map components which is based on product data (simple Image slider)

I am currently learning and trying to build a ecommerce website, but I am stuck in the product page for a while. I am trying to add flex style to the map component that is from a certain data, but it seems like not working.

This is the map component

  const listItems = product_card.map((item) => (
    <div className="card" key={item.id}>
      <section className="card_Container">
        <div className="card_imgBox">
          <SimpleImageSlider
            className="card_img"
            width={400}
            height={300}
            images={item.thumb}
            showBullets={true}
            showNavs={true}
          />
          <div className="card_info">
            <h2>{item.product_name}</h2>
            <p>{item.description}</p>
            <p className="price">
              {item.price}
              <span>{item.currency}</span>
            </p>
          </div>
        </div>
      </section>
    </div>
  ));

And this is the scss for this component.

.card{
    background-color: aqua;
    .card_Container{
        // display: flex;
        // background-color: black;
        .card_imgBox {
            display: flex;
            flex-direction: column;
            text-align: left;
            align-items: center;
            width: 500px;
            height: 500px;
            margin-bottom: 20px;
            margin-left: 2%;
            padding-top: 20px;
            border-radius: 20px;
            background-color: bisque;
            .card_img {
                margin-top: 200px;
           }
        }
    }
}

The result always show me the boxed vertically instead of horizontally. Any helps would be appreciated

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