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

213
Vistas
object-fit:cover resizes img width

I'm trying to make a carousel slide, but when I'm using object-fit:cover and adding the second image the first and the second image width are changing from 100% to 50%

on 1 input it works fine See photo here

on second input it's changing its width See photo2 here

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

I think the object-fit:cover property can be set with the width property.

image {
    width: 100%;
    object-fit: cover;
}

Then the image places appropriately so that it's width is 100%.

about 4 years ago · Juan Pablo Isaza Denunciar

0

If you really want img to be 100% in flex layout you can use one of these options:

img {
    width: 100%;
    flex-shrink: 0;
}

img {
    min-width: 100%;
}

If smth else - update/improve your question

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