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

155
Views
Can't get the dynamic height right for embedded iframe

I am working on a WordPress website and want to embed an iframe from an external reservation/booking tool.

My issue: I can't make the height of the iframe dynamic. A fixed height of the iframe won't be a good solution in this case.

URL I want to embed https://w1.roomsoftware.com/de/markus-raab

Elementor Custom HTML widget:

<iframe src="https://w1.roomsoftware.com/de/markus-raab" id="booking"></iframe>

<script>
// Selecting the iframe element
var iframe = document.getElementById("booking");

// Adjusting the iframe height onload event
iframe.onload = function(){
    iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
}

Any idea what could be the reason that this does not work?

Screenshot shows the scrollbar of the embedded iframe

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!