PDA

View Full Version : Issue With Self-Resizing Content Section



FreeRadicalX
30 Mar 2008, 02:42 PM
So I'm creating a website for a youtube series. The site contains a blog/forum/list of previously released episodes/other content, but the main featured thing is the latest episode. So the top of the page is a youtube video of the latest episode. Below that, there are links to all the extra content, which loads at the bottom of the page. The whole site is contained within a column on the center of the page that's about 750 pixels wide (there are cool graphics on the left and right sides of the page). We even managed to create a forum that fit into those 750 pixels using vanilla forums.

But I've run into a snag: getting the bottom content section to resize vertically to fit the content that loads into it. I don't want the content section to have a scroll bar of it's own- that's ugly and not forum/blog-friendly. I want the only scroll bar to be the one for the whole entire page. That means, clearly, that if a page loads into the content section that is taller than the content section currently is, the content section needs to resize to fit it (right now I'm using an iframe, but I'm not married to that). Turns out that the internet is large and robust enough to supply me with a solution that resizes the content when one of the links in the middle of the page is clicked and it's content loaded in. But then I ran into the real problem: the solution didn't account for links clicked from WITHIN the content. So if, say, someone clicked a link from the forum that loaded an even taller page in the content section, it wouldn't resize- ugly scroll bars yay! And of course that will happen, it's a forum.

So I come before you here- does any body have a solution to this problem? Has anybody ever created a layout like this where the content on the bottom has to resize dynamically according to the pages that link to each other from within it? Tables/iframes/divs/css/javascript.... Whatever it takes, I'm for it if you can help me out. I thank anyone who tries in advance.

(Oh, and if you need any more specific description, just ask.)

Wickham
31 Mar 2008, 01:35 AM
I can't think of a solution except to use a target for the links in the iframe files which will open the link full screen instead of inside the same iframe that doesn't have enough height.

target="_new" or target="_blank" (new window), target="_parent" (parent of current frame, often full window if you don't have nested framesets) and target="_top" (loads in the full body of the window)

See
http://www.wickham43.net/framesets.php

Edit: on second thoughts that only works if you can code the target into the page link, but if it's a page from another source which you don't control you can't do that.