Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

151
Vistas
Image on React and/or CSS not appearing

I am unable to insert an image to my sign up page. I have tried inserting it using index.js (HTML codes in React component) and also in the corresponding CSS file. Both not working. Sharing the codes and screenshot below (I have removed irrelevant import codes):

React Component code:

import styles from "./register.css";

    return(
        <div>
            <div id="styledImg">
                <img alt="" title="" src="../../src/assets/bocLogo.png"/>
            </div>
        </div>
    );
}

export default Register;

CSS code:

#styledImg {
    width: 1110px;
    height: 428px;
    height: 428px;
    position: absolute;
    top: 245px;
    left: 87px;
}

#styledImg Img {
    max-width: 100%;
    max-height: 100%;
}
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You have to upload that image as a ReactComponent. import { ReactComponent as Logo } from "../../assets/your-image.png"; So that should look like:

import styles from "./register.css";
import { ReactComponent as Image } from "../../assets/your-image.png"

    return(
        <div>
            <div id="styledImg">
                <img alt="" title="" src={Image}/>
            </div>
        </div>
    );
}

export default Register;
about 4 years ago · Juan Pablo Isaza Denunciar

0

You have to import the image and then use the imported file as src. it would be something like this.

import logo from '.../../src/assets/bocLogo.png';

and then you will use this logo in src

<img src={logo} alt="Logo" />;

for more information please check This link

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda