PDA

View Full Version : LAYER positioning problem (tables)


Gordo
08-21-2002, 10:41 AM
ILAYER/LAYER in Netscape 4.x problem...this is NOT in my area of expertise (if any). So, I appreciate your "spelling it out" -- as always.

When I use the following code, IE and N6 work perfectly. But, N4.x places the LAYER in the middle of the page, about 10px below the top of the page (see ATTACHMENT). I guess it's seeing the 10px transparent image that I have above it.

Anyway, this ILAYER/LAYER/IFRAME is contained in a table cell. I've searched these forums and the "old" forums for my answer. I've found some clues, but no solutions.

Is it possible for N4.x to display this LAYER where I want it to? I cannot position it with top=20 left=50 height=400 clip.bottom=400 clip.right=500 as in this example (http://wdvl.internet.com/Authoring/DHTML/CB/LOD/).

Since each users' resolution can be different, I can't just position it. If it were going to be in the upper-left corner, I think I could swing it. But since it's not, I'm at a loss for how to make this work.

If it's just not possible, I guess I could redo the links such that they were standard page links (take over current window) in N4.x, and use the IFRAME for IE and N6.

And finally, I can't see anything else on the page. There's more there as you can see by the code. I guess/hope that'd be cleared up once this thing is properly positioned (again...if possible).

<body bgcolor="#FFFFFF" marginheight="0" marginwidth="0" leftmargin="0" topmargin="0">
Header will go here (separate, stand-alone table).
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
<tr>
<td width="100" valign="top" background="../images/bg_left_100x1428.jpg">
Navigation links will go here.
</td>
<td width="100%" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="5"><img border="0" src="../images/1x1.gif" width="5" height="1"></td>
<td>
<table border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
<td valign="top" nowrap>
<p><img src="../images/services_222x61.jpg" width="222" height="61" border="0"><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="financial_audits_reviews.html" target="content">Financial Audits and Reviews</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="compilation_write_up.html" target="content">Compilation & Write-Up</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="high_tech_services.html" target="content">High Tech Services</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="lending_services.html" target="content">Lending Services</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="performance_improvement.html" target="content">Performance Improvement</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="financial_projections_and_forecasts.html" target="content">Financial Projections and Forecasts</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="investment_advisory_services.html" target="content">Investment Advisory Services</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="tax.html" target="content">Tax</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="mergers_acquisition_consulting_due_diligence.html" target="content">Mergers and Acquisition Consulting and Due Diligence</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="sec_small_business_filers.html" target="content">SEC Small Business Filers</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="tax_return_preparation_services.html" target="content">Tax Return Preparation Services</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="controllership_start_up_services.html" target="content">Controllership and Start Up Services</a><br>
<img src="../images/1x1.gif" width="1" height="7" border="0"><br>
<a href="services_audit_committees_public_companies.html" target="content">Services for Audit Committees of Public Companies</a></p>
</td>
<td valign="top" width="100%">
<img src="../images/1x1.gif" width="1" height="10" border="0"><br>
<ilayer><layer name="content" width="350" height="400" style="visibility:hidden" src="blank_page.html"></layer></ilayer>
<nolayer>
<iframe name="content" id="content" style="position:relative; width:100%; height:200" src="blank_page.html" scrolling="auto" frameborder="0"></iframe>
</nolayer>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>

Roy Sinclair
08-21-2002, 03:01 PM
I've never found nesting a layer inside an ilayer to work very well. I've found it's simpler to place the ilayer where I want the layer to go and then use javascript to get it's coordinates. Then I can move the layer to the right coordinates.

Ilayers are of course simply too buggy to be used in and of themselves.

See this code where I write a counter to a layer which is positioned to match an ilayer:


if (document.layers)
{
document.layers.P1.pageX = document.layers.PP1.pageX
document.layers.P1.pageY = document.layers.PP1.pageY
document.layers.P1.document.open()
document.layers.P1.document.write ('<b>' + P1Count + '</b>')
document.layers.P1.document.close()
}

Gordo
08-22-2002, 01:40 AM
Thanks Roy Sinclair, but I think something like that is beyond my capabilities. I'd rather just exclude N4.x altogether and have separate link actions.

Any others?