Click to See Complete Forum and Search --> : target other than iframe


beba
11-05-2005, 07:11 PM
Hello all, need a bit of help. I have created a website and have two designated boxes for content. I thought of making them iframe's in order for the content to open in them from the menu, but I don't like the scroll bars. I would rather the area read how much room it needs and expand to accomodate the content. This may sound unclear...

I have created a table with a top image, a middle image to be repeated, and a bottom image. This would work if my content was static but I need to be able to have something for my content to open in (the content for each page is different lengths). Can you even target a table? I imagine this wouldn't be possible. Is there any way that I can code an iframe to adjust its height? Or do I have any other options?

And I"m not looking for someone to code this for me, don't worry. Just need some direction towards what would work and I can take it from there. :)

Any help would be appreciated, thanks.

Kravvitz
11-05-2005, 07:55 PM
I suggest you use PHP includes (http://www.php.net/manual/en/function.include.php) or SSI (http://httpd.apache.org/docs/howto/ssi.html)

Vic
11-05-2005, 09:37 PM
Frankly, I'm not quite sure what you require, but here are some thoughts:

1. You can create a table that spans the entire page, leaving top and bottom cells as your header and footer, and including a fully-stretched iframe in the middle to hold your content. Something like:
<table style='position: absolute; top: 0px; left: 0px; width: 100%; height: 100%'>
<tr style='height: 50px'><td>This is my header</td></tr>
<tr><td><iframe src='sourcePage.htm' style='width: 100%; height: 100%'></td></tr>
<tr style='height: 50px'><td>This is my footer</td></tr>

2. If the above does not suit, you can size and move around frames independently using POSITION, TOP, BOTTOM, LEFT, RIGHT, WIDTH and HEIGHT style attributes, but realize that (since it is a windowed object) you cannot let it 'automatically' stretch to the size of the content.

3. You can manager the scrollbars through OVERFLOW, OVERFLOW-X and OVERFLOW-Y style attributes, but remember that if you set any overflow to hidden, the excess will not be visible, but there also will not be any scrollbars and hence it will not be accessible, so use it carefully.