Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!