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

157
Vistas
Responsive iframe, set height, dynamic width

Need help on making an iframe responsive, keeping the height intact, but cutting width up to the center of a video when changing width of screen, instead of keeping the full width video.

<style>
.container {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-top: 45.98%;
}

.responsive-iframe {
  position: absolute;
  overflow: hidden;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
}
</style>

Right now i have this style code, where if I resize the browser window, it resize the entire video's height. But I need to keep the height, and cutting the video's width.

In the photo below, I Show an example of how I would like it. Same Height, but cutting the video's width responsively.

https://i.stack.imgur.com/uTmXH.png

about 4 years ago · Juan Pablo Isaza
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