By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,016 Members | 1,033 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,016 IT Pros & Developers. It's quick & easy.

Another iFrame question

P: n/a
I have searched NUMEROUS sources in an effort to find the magic
(script, styles, syntax, etc.) that will allow me to create a web page
with the following format:

|----------------------------------------------------------------|
| Discrete table used as 'banner' |
| DONE! |
|----------------------------Table 1-----------------------------|

|----------------------------------------------------------------|
| |---------------------------------------------| |
| | Nested tables 2 and 3 used as 'menu bar' | |
| DONE! |----------------Table 3----------------------| |
|--------Table 2-------------------------------------------------|

|-----------------------Table 4----------------------------------|
| |--Col A----|--------Col B-----------------------------------| |
| | <td> | |---------iFrame------------------------------|| |
| | W = 25% | | W = 100% || |
| | H = 100% | | iFrame serves as 'target' for links in Col A|| |
| | | | iFrame height NOT DONE!! || |
| |Java-driven| |---------------------------------------------|| |
| | menu here | | | |
| | serves as | <td> |Dynamically adjusts | |
| | nav page! | W = 75% |to size of web page | |
| | | H = 100% |called by links on left| |
| | DONE! | DONE! V | |
| |-----------|------------------------------------------------| |
| |
|----------------------------------------------------------------|

All aspects of this layout work... except the height of the iFrame! I
want the iFrame to FILL THE TABLE CELL -- dynamically adjusting to the
height of the iFrame to accommodate the height of the document 'called'
by the link in Col A ('Nav Page'). It does not. (Clicking a link on
the Nav menu in Col A DOES load the desired web page into the iFrame.)
Setting the iFrame height attribute to 100% makes the iFrame
inoperative/invisible.

Is there a way to make the iFrame fill the table cell -- or am I trying
to do 'Mission Impossible'?? Any suggestions from this collective body
of wisdom??? Help/Guidance would be appreciated!

gary b

Jul 24 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
SF RVN wrote:
I have searched NUMEROUS sources in an effort to find the magic
(script, styles, syntax, etc.) that will allow me to create a web page
with the following format:

|----------------------------------------------------------------|
| Discrete table used as 'banner' |
| DONE! |
|----------------------------Table 1-----------------------------|

|----------------------------------------------------------------|
| |---------------------------------------------| |
| | Nested tables 2 and 3 used as 'menu bar' | |
| DONE! |----------------Table 3----------------------| |
|--------Table 2-------------------------------------------------|

|-----------------------Table 4----------------------------------|
| |--Col A----|--------Col B-----------------------------------| |
| | <td> | |---------iFrame------------------------------|| |
| | W = 25% | | W = 100% || |
| | H = 100% | | iFrame serves as 'target' for links in Col A|| |
| | | | iFrame height NOT DONE!! || |
| |Java-driven| |---------------------------------------------|| |
| | menu here | | | |
| | serves as | <td> |Dynamically adjusts | |
| | nav page! | W = 75% |to size of web page | |
| | | H = 100% |called by links on left| |
| | DONE! | DONE! V | |
| |-----------|------------------------------------------------| |
| |
|----------------------------------------------------------------|

All aspects of this layout work... except the height of the iFrame! I
want the iFrame to FILL THE TABLE CELL -- dynamically adjusting to the
height of the iFrame to accommodate the height of the document 'called'
by the link in Col A ('Nav Page'). It does not. (Clicking a link on
the Nav menu in Col A DOES load the desired web page into the iFrame.)
Setting the iFrame height attribute to 100% makes the iFrame
inoperative/invisible.

Is there a way to make the iFrame fill the table cell -- or am I trying
to do 'Mission Impossible'?? Any suggestions from this collective body
of wisdom??? Help/Guidance would be appreciated!

gary b

Well.... I have had no luck with this either. I've tried using both CSS
and <iframe> attributes to set the height to percentages of the table
cell. I've also tried using various tweaks to size it via margins (CSS).
Nothing has worked. I'm not sure that it is possible. If I am wrong,
though, I'd love the answer as well...

--
Grant Smith
A+, Net+, MCP x 2

eNVENT Technologies - www.envent-tech.com
Jul 24 '05 #2

P: n/a
Grant Smith - eNVENT Technologies wrote:
Well.... I have had no luck with this either. I've tried using both CSS and <iframe> attributes to set the height to percentages of the table cell. I've also tried using various tweaks to size it via margins (CSS). Nothing has worked. I'm not sure that it is possible. If I am wrong,
though, I'd love the answer as well...

--
Grant Smith
A+, Net+, MCP x 2

eNVENT Technologies - www.envent-tech.com


One website I use for a reference states that the value for the height
attribute (of an iFrame) can only be given in 'px' -- that may explain
why the iFrame "disappears" when I used height="100%". And I did find
some code that claims to adjust the iFrame height... but I've not been
able to get it to work. Another website states that dynamic adjustment
of the iFrame is possible --- using code to get (and pass) the height
of the 'loaded' document to the iFrame. Whew... seems like a lot of
work -- and beyond my capabilities.

The only way to work around (ignore!) the issue is to specify a height
for the iFrame (pixels only!) that is long enough to accommodate all
possible loaded pages. It works... you just have to ignore the extra,
blank turf at the bottom of the parent page.

I hate to give up on this. I like the 'feel' and the layout. But I
see no 'user friendly' solution. Anyone run across a 'how to' in your
travels??

gary b

Jul 24 '05 #3

P: n/a
SF RVN wrote:
Grant Smith - eNVENT Technologies wrote:
Well.... I have had no luck with this either. I've tried using both CSS
and <iframe> attributes to set the height to percentages of the table
cell. I've also tried using various tweaks to size it via margins (CSS).
Nothing has worked. I'm not sure that it is possible. If I am

wrong, though, I'd love the answer as well...

--
Grant Smith
A+, Net+, MCP x 2

eNVENT Technologies - www.envent-tech.com


One website I use for a reference states that the value for the

height attribute (of an iFrame) can only be given in 'px' -- that may explain why the iFrame "disappears" when I used height="100%". And I did find some code that claims to adjust the iFrame height... but I've not been able to get it to work. Another website states that dynamic adjustment of the iFrame is possible --- using code to get (and pass) the height
of the 'loaded' document to the iFrame. Whew... seems like a lot of
work -- and beyond my capabilities.

The only way to work around (ignore!) the issue is to specify a height for the iFrame (pixels only!) that is long enough to accommodate all
possible loaded pages. It works... you just have to ignore the extra, blank turf at the bottom of the parent page.

I hate to give up on this. I like the 'feel' and the layout. But I
see no 'user friendly' solution. Anyone run across a 'how to' in your travels??

gary b


I've had that same trouble i believe when i started this page, but this
is my iframe section that i got to work. Hopefully it is of some use.

<td width="600" height="100%" rowspan="4" align="left" valign="top">

<iframe src="content.html" name="center" width="100%"
height="100%" frameborder="0" allowtransparency="true">

<!-- Alternate content for non-supporting browsers -->

<p>Oops your browser doesn't like Inline Frames sorry...</p>

</iframe>

</td>

Jul 24 '05 #4

P: n/a
Thanks for the lead, Morgan...

Unfortunately, that did not work. I have a couple other ideas. If I
have any success, I'll post back to the group.

Thanks again for your suggestion.

gary b
morgan goose wrote:

I've had that same trouble i believe when i started this page, but this is my iframe section that i got to work. Hopefully it is of some use.
<td width="600" height="100%" rowspan="4" align="left" valign="top">

<iframe src="content.html" name="center" width="100%"
height="100%" frameborder="0" allowtransparency="true">

<!-- Alternate content for non-supporting browsers -->

<p>Oops your browser doesn't like Inline Frames sorry...</p>
</iframe>

</td>


Jul 24 '05 #5

P: n/a
SF RVN wrote:
Thanks for the lead, Morgan...

Unfortunately, that did not work. I have a couple other ideas. If I
have any success, I'll post back to the group.

Thanks again for your suggestion.

gary b
morgan goose wrote:
I've had that same trouble i believe when i started this page, but


this
is my iframe section that i got to work. Hopefully it is of some


use.
<td width="600" height="100%" rowspan="4" align="left" valign="top">

<iframe src="content.html" name="center" width="100%"
height="100%" frameborder="0" allowtransparency="true">

<!-- Alternate content for non-supporting browsers -->

<p>Oops your browser doesn't like Inline Frames


sorry...</p>
</iframe>

</td>


I suppose I could contrive a way to tell my html pages via PHP how big
to make the Iframe and it wouldn't be that hard. If I have a chance to
play around, I'll post the results.

--
Grant Smith
A+, Net+, MCP x 2

eNVENT Technologies - www.envent-tech.com
Jul 24 '05 #6

P: n/a
Problem has been resolved!! The solution was to take the iFrame out of
the layout table (!) and then apply a script that actually resizes the
iFrame(!). This excellent script (along with some others) can be found
here:

http://www.dynamicdrive.com/dynamici...iframessi2.htm

A 'tip-o-the-hat' to DynamicDrive and thanks to all for their input.

Cheers!

gary b

Jul 24 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.