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

193
Views
Why is the iframe not taking up the entire page?

I'm trying to get https://vscode.dev/ to pop up and take up the entire page when I click on the icon, but instead it seems to be only taking up the top part of the page. how can i fix this?

    var div = document.getElementById("content");          
    while(div.firstChild) {
        div.removeChild(div.firstChild);
    }
    document.getElementById("vscode").height = "100%";
    document.getElementById("vscode").width = "100%";
}```
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Elements are not 100% height by default and child elements are dependent on the parent height.

So you need to set the height of the parents including html and body elements to 100% height if you want a child to be 100% height.

html, body {
 margin: 0;
 padding: 0;
 width: 100%;
 height: 100%;
}

#vscode {
 width: 100%;
 height: 100%;
 border:0
}
<iframe src="https://vscode.dev/" id="vscode"/>

Additionally, you could use 100vh

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