Free Space coming while calling Iframe

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AKMK
    New Member
    • May 2010
    • 3

    Free Space coming while calling Iframe

    I have a index.html page which internally contains
    <iframe name="IWS" frameborder="7" id="IWS" src="default.ht ml" background-color: lime></iframe>
    <iframe name="dummy" frameborder="0" src="" style="display: none;"></iframe>

    when i am calling this iframes it is coming with extra space
    but if i am moving it out space is not there
    without i frame many menus are not working
    can u suggest to remove this freespace
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    Your problem isn't all that clear, but, nevertheless, try removing the margin/padding of the iframe.

    Code:
    <iframe style="margin: 0px; padding: 0px;" [etc] />

    Comment

    • AKMK
      New Member
      • May 2010
      • 3

      #3
      Let me put my question more detailed:

      There are two htmls (index.html and default.html) used to display a homepage of an application.

      The index.html contains iframes (named: xyz). This iframe will be loaded with default.html by default. Whenever other pages in the homepage are clicked, the xyz frame is loaded by that particular page.

      The problem is, we always see more unused space left in the bottom of homepage. This space is vanished when we remove the iframe, but doesn't load other contents in xyz iframe.

      Attached the screenshot showing space in the homepage (lengthy scroll)

      Please suggest if there is anyway we can incorporate iframe in html without space issue.
      Attached Files

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        I strongly recommend against using IFrames.

        Anyways, you can set the height and width of the IFrame using CSS to the size that you want the frame to be.

        Or you could use JavaScript to set the height and width of the iframe according the the window size.

        -Frinny

        Comment

        Working...