2 Replies Latest reply on Sep 7, 2008 7:05 PM by Newsgroup_User

    iFrame size woes...

    Level 7
      I rarely use iframes, but I'm using a component that requires one to render
      an update panel.

      When I run the site, the iframe tag is generated as such:

      <iframe id="Upload_ProgressBar1" class="ProgressBar"
      src="Progress.aspx?frameborder="0" scrolling="no"
      name="Upload_ProgressBar1">
      </iframe>

      Note that there is no width/height attributes. Also note that there is no
      CSS referencing the iFrame.

      However, it still seems to render at a default width and height. It appears
      roughly 100px tall x 400px wide.

      Via javascrpt or CSS, I can make the iframe BIGGER, but I can't seem to make
      it smaller than that defined size.

      Is there a minimum size that an iframe has to be in browsers?

      I'd try to modify the HTML itself, but, alas, the actual iFrame is rendered
      from compiled server side code, so I can only access it via javascript or
      CSS after the fact.

      -Darrel


        • 1. Re: iFrame size woes...
          Level 7
          "Darrel" <notreal@nospam.com> wrote in message
          news:ga1gg8$qid$1@forums.macromedia.com...
          >I rarely use iframes, but I'm using a component that requires one to render
          >an update panel.
          >
          > When I run the site, the iframe tag is generated as such:
          >
          > <iframe id="Upload_ProgressBar1" class="ProgressBar"
          > src="Progress.aspx?frameborder="0" scrolling="no"
          > name="Upload_ProgressBar1">
          > </iframe>
          >
          > Note that there is no width/height attributes. Also note that there is no
          > CSS referencing the iFrame.
          >
          > However, it still seems to render at a default width and height. It
          > appears roughly 100px tall x 400px wide.
          >
          > Via javascrpt or CSS, I can make the iframe BIGGER, but I can't seem to
          > make it smaller than that defined size.
          >
          > Is there a minimum size that an iframe has to be in browsers?
          >
          > I'd try to modify the HTML itself, but, alas, the actual iFrame is
          > rendered from compiled server side code, so I can only access it via
          > javascript or CSS after the fact.

          Hi Darrel,

          You should be able to resize the iframe with no problem.
          There is something I notice though from the markup you posted:

          <iframe id="Upload_ProgressBar1" class="ProgressBar"
          src="Progress.aspx?frameborder="0" scrolling="no"
          name="Upload_ProgressBar1">
          </iframe>

          it should be:
          <iframe id="Upload_ProgressBar1" class="ProgressBar"
          src="Progress.aspx" frameborder="0" scrolling="no"
          name="Upload_ProgressBar1">
          </iframe>

          The quotes in there are wrong. Could that be the problem?


          --
          Thierry
          Articles and Tutorials: http://www.TJKDesign.com/go/?0
          --
          http://developer.yahoo.com/ helps you build applications and mashups

          • 2. Re: iFrame size woes...
            Level 7
            > The quotes in there are wrong. Could that be the problem?

            That must have been a cut-and-paste issue.

            I'm not sure what the issue was.

            I was able to over-ride whatever the issue was by just adding a CSS
            declaration on the page:

            iFrame {width/height}

            The issue appeared to be that the iFrame wasn't getting any inline
            width/height attributes so was defaulting to some specific size.

            Alas, the code that creates the HTML is a compiled DLL so I couldn't easily
            poke around to see what it was doing.

            Oh well, the CSS works, and I can subsequently modify that via javascript,
            so all's well.

            -Darrel