Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

positioning tables and iframes

Status
Not open for further replies.

rubychyld

Programmer
Mar 22, 2001
76
US
I've been struggling with this for a while...
I want to use % values so the whole browser width and height are used.

I have a regular table w=100% h=100% as a bounding box. Inside I have a simple table. Then outside the main bounding table there is an iframe.

This works until.... I add a second table inside of the bounding box - which causes my iframe to scroll outside of the visible browser view (so you can't see the down arrow).

Or if I put the iframe inside of this main bounding table, I can't see the iframe at all.

Why is this happening?

Here is a sample of the code so you can see I am not crazy. If you have any suggestions, please oh please do share!!

Thanks, Liz


<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr><td height=&quot;100%&quot;>

<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td width=&quot;25%&quot;>policy</td>
<td width=&quot;25%&quot;>endorsements</td>
<td width=&quot;25%&quot;>billing</td>
<td width=&quot;25%&quot;>claims</td>
</tr>
</table>

</td></tr></table>

<iframe id=content name=&quot;content&quot; src=&quot; width=&quot;100%&quot; height=&quot;100%&quot; scrolling=&quot;Default&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; >hello</iframe>
 
Sometimes you can have too many width and height definitions. It sounds counterintuitive, since each width and height should fill the percentage of the containing table, cell, etc. However, some browsers sometimes take the 100% to mean 100% of the browser window, not the containing cell or table. So, try removing some of your size declarations and it might fit the way you want.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Hello Rxxxx ;-)

This should do the trick!

*****************************************
<body LEFTMARGIN=0 TOPMARGIN=0>
<table width=&quot;100%&quot; height=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td height=&quot;1%&quot;>

<table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<TD WIDTH=&quot;25%&quot; BGCOLOR=&quot;#00FF00&quot;>policy</TD>
<td width=&quot;25%&quot; BGCOLOR=&quot;#00FF00&quot;>endorsements</td>
<td width=&quot;25%&quot; BGCOLOR=&quot;#00FF00&quot;>billing</td>
<td width=&quot;25%&quot; BGCOLOR=&quot;#00FF00&quot;>claims</td>
</tr>
<tr>
<TD WIDTH=&quot;25%&quot; BGCOLOR=&quot;#008000&quot;>policy</TD>
<td width=&quot;25%&quot; BGCOLOR=&quot;#008000&quot;>endorsements</td>
<td width=&quot;25%&quot; BGCOLOR=&quot;#008000&quot;>billing</td>
<td width=&quot;25%&quot; BGCOLOR=&quot;#008000&quot;>claims</td>
</tr>
</table>

</td>
</tr>
<TR>
<td height=&quot;99%&quot;>
<iframe id=content name=&quot;content&quot; src=&quot; width=&quot;100%&quot; height=&quot;100%&quot; scrolling=&quot;Default&quot; frameborder=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; >hello</iframe>
</TD>
</TR>
</table>
*****************************************


If you need any more help,
Just let me know.
bram
 
Thank you so much. That was just the trick I needed... you're amazing! Thanks for posting.

Liz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top