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

307
Vistas
CardMedia height material-ui

Im struggling trying to change the height of the image inside the CardMedia

Im setting the style with

const style = {
  height: 32,
};

and using it in

<CardMedia
  overlay={<CardTitle title="Title"/>}
  mediaStyle={style}>

  <img src="imgUrl" />
</CardMedia>

but the height of the image remains the same. The only thing that happens is that the overlay with the title moves to the top. I've tried all the CardMedia properties but i havent succeeded

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

You need to apply the styles on the image directly:

<CardMedia overlay={<CardTitle title="Title"/>}>
  <img src={imgUrl} style={style}/>
</CardMedia>

Set desired width and height of the image, Card will adjust to the image.

over 4 years ago · Santiago Trujillo Denunciar

0

try using style instead of mediaStyle, like

const Style = {
  height: 32,
};

    <CardMedia
      overlay={<CardTitle title="Title"/>}
      style={Style}>

      <img src="imgUrl" />
    </CardMedia>
over 4 years ago · Santiago Trujillo 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