• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    Feature request: Auto-resize iframes based on content

    Suggestions and feature requests
    1
    3
    789
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • craig-francis
      craig-francis last edited by

      After the recent removal of the @seamless attribute on the <iframe> from the WHATWG spec:

      https://github.com/whatwg/html/issues/331

      We still need to consider the problem of setting the height of iframes, so they contain their content without scroll bars.

      As discussed at:

      https://github.com/whatwg/html/issues/555
      https://lists.w3.org/Archives/Public/www-style/2016Jan/0236.html
      https://lists.w3.org/Archives/Public/www-style/2016Feb/0004.html

      The solution may simply involve the CSS:

      #iframe { height: max-content; }
      

      And a header on the framed content, rather than custom/buggy JavaScript.


      I'm keeping my notes on:

      https://github.com/craigfrancis/iframe-height

      Reply Quote 0
        1 Reply Last reply
      • craig-francis
        craig-francis last edited by

        Alternatively we could look at a new keyword for the resize[1] property, which would be useful for a <textarea> that automatically increases its height based on its content - another problem which requires JavaScript to solve.

        [1] https://developer.mozilla.org/en-US/docs/Web/CSS/resize

        Reply Quote 0
          1 Reply Last reply
        • craig-francis
          craig-francis last edited by

          ... useful for a <textarea> that automatically increases its height...

          Reply Quote 0
            1 Reply Last reply
          • First post
            Last post

          Computer browsers

          • Opera for Windows
          • Opera for Mac
          • Opera for Linux
          • Opera beta version
          • Opera USB

          Mobile browsers

          • Opera for Android
          • Opera Mini
          • Opera Touch
          • Opera for basic phones

          • Add-ons
          • Opera account
          • Wallpapers
          • Opera Ads

          • Help & support
          • Opera blogs
          • Opera forums
          • Dev.Opera

          • Security
          • Privacy
          • Cookies Policy
          • EULA
          • Terms of Service

          • About Opera
          • Press info
          • Jobs
          • Investors
          • Become a partner
          • Contact us

          Follow Opera

          • Opera - Facebook
          • Opera - Twitter
          • Opera - YouTube
          • Opera - LinkedIn
          • Opera - Instagram

          © Opera Software 1995-2025