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

159
Visualizações
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 à 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