October 21, 2024
Chicago 12, Melborne City, USA
HTML

How do I resize a page to fit an iframe?


So I’m trying to make a website with html/css. There’s sidebars on the website I want to remain universal across pages so I don’t need to update every page whenever I change the sidebars, so I used iframe to import the sidebars on the pages. However, when the sidebars are taller than the page itself hosting the content, there’s these scroll bars on the iframe and the iframe itself is obviously just cut off to the height of the page. Is there any way to change it so the source website is fit to the height of the iframes? Or is that not possible? Also I can’t use javascript

I’ve tried changing the height in the css stylesheet of the iframes. The closest solution I’ve gotten is just putting in a ton of <br> tags in the main content of each page to fill the size for the iframes to fully expand.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video