/    Sign up×
Community /Pin to ProfileBookmark

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

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@PeOfEoSep 13.2005 — [COLOR=deeppink]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.[/COLOR]
Copy linkTweet thisAlerts:
@bazanaiusauthorSep 14.2005 — 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.
Copy linkTweet thisAlerts:
@PeOfEoSep 14.2005 — [COLOR=deeppink]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.[/COLOR]
Copy linkTweet thisAlerts:
@bazanaiusauthorSep 15.2005 — 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.
×

Success!

Help @bazanaius spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...