www.webdeveloper.com
Results 1 to 5 of 5

Thread: iFrame resizing

  1. #1
    Join Date
    Sep 2005
    Posts
    20

    iFrame resizing

    Hey guys, I've got a site with an iframe which contains a forum. the size of the forum page changes depending upon how many posts there are in it. Currently I have to set the size of the iframe to a set 7000 pixels in order to fit in the largest pages, but this makes the smaller pages appear on the bigger size too. this is fine until something is centre aligned, and the thing doesnt appear - its halfway down the screen! or you click on a link at the bottom of the page, but it doesnt move to the top, so youve got an apparently blank screen.

    does anyone know how to make it so that the frame resizes itself to the page size, and always moves to the top of the screen when it loads?

    I've tried height="100%", and no scrolling but it still gives the same problems.
    thanks in advance,

    Baz

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,224
    There is no easy way to do this without javascript (which could make your whole page inaccessible to a good chunk of the internet in the process). You can make the iframe 100% of the page and allow it to scroll though... or better yet, use an alternative method.

  3. #3
    Join Date
    Sep 2005
    Posts
    20
    what alternative methods are there? The trouble is I have to link to a remote site for the forum, so I need a way of embedding it in the page.

  4. #4
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,224
    Why does not need to be embedded into the page? Would you be able to run the forum scripts on the same server as the rest of the site by any chance?

    I would use a regular frame in this situation if I had to use a frame rather than an iframe.

  5. #5
    Join Date
    Sep 2005
    Posts
    20
    Well I don't have the script for the forum - its run by the guys at invisionfree.com, so I just get an URL. I'd rather use an Iframe as otherwise I need to rearrange the rest of my site.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles