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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Layers problem !!!!!

Status
Not open for further replies.

paragvshah

Programmer
Jan 11, 2001
109
IN
Hi friends,

I have a problem in my site where i have used layers in a frame there six links in topframe which has even sublinks, which i have displayed thru invisible layers on mouseover event, there is one main layer in which i have placed a table which has links & all other layers are in the main layer(i.e. child layers) but the problem arises when the screen resolution is set to greater than 800*600, the main layer gets sets with the resolution on the whole page but the child layers are not does not move with (i.e. position is unchanged) so the layers are not displayed below its links.

Can anybody give me a solution regarding this.
 
Can you post a bit of your layer code? I would be interested in seeing what your parent layer has that your child layers dont that makes it dynamic while they are static. As far as I know layers are purely static. I would love to see your code for a dynamic layer that resizes on resolution change.
 
This is the code.

<body leftmargin=&quot;0&quot; topmargin=&quot;0&quot; bgcolor=&quot;#CCFFFF&quot; >
<center>
</center>
<div style=&quot;position:absolute; left:0px; top:2px&quot; id=topmenu >
<center>
</center>
<center>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=&quot;100%&quot; >
<tr>
<td ALIGN=LEFT VALIGN=TOP WIDTH=&quot;5&quot; HEIGHT=&quot;20&quot; BGCOLOR=&quot;#CCFFFF&quot;>&nbsp;</td>
<td ALIGN=LEFT VALIGN=TOP WIDTH=&quot;104&quot; HEIGHT=&quot;20&quot; BGCOLOR=&quot;#66FFFF&quot;>
<div align=&quot;center&quot;><font face=&quot;Verdana&quot;><a href=&quot;clinicin.htm&quot; onMouseover=&quot;MM_showHideLayers('clinic','','show','articles','','hide','about','','hide','homoeo','','hide')&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot; color=&quot;blue&quot;>Clinic
Info</font></a></font></div>
</td>
<td ALIGN=LEFT VALIGN=TOP WIDTH=&quot;126&quot; HEIGHT=&quot;20&quot; BGCOLOR=&quot;#66FFFF&quot;>
<center>
<font face=&quot;Verdana&quot;><a href=&quot;faq.htm&quot; target=&quot;mainFrame&quot; onmouseover=&quot;MM_showHideLayers('faq','','show','clinic','','hide','articles','','hide','about','','hide','homoeo','','hide')&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>FAQs</font></a></font>
</center>
</td>
<td ALIGN=LEFT VALIGN=TOP WIDTH=&quot;140&quot; HEIGHT=&quot;20&quot; BGCOLOR=&quot;#66FFFF&quot;>
<div align=&quot;center&quot;><left><font face=&quot;Verdana&quot;><a href=&quot;articles.htm&quot; onMouseover=&quot;MM_showHideLayers('articles','','show','clinic','','hide','about','','hide','homoeo','','hide')&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Articles</font></a></font></left></div>
</td>
<td ALIGN=LEFT VALIGN=TOP WIDTH=&quot;169&quot; HEIGHT=&quot;20&quot; BGCOLOR=&quot;#66FFFF&quot;>
<div align=&quot;center&quot;><font face=&quot;Verdana&quot;><a href=&quot;aboutus.htm&quot; onMouseover=&quot;MM_showHideLayers('about','','show','articles','','hide','clinic','','hide','homoeo','','hide')&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>About
Us</font></a></font></div>
</td>
<td ALIGN=LEFT VALIGN=TOP WIDTH=&quot;135&quot; HEIGHT=&quot;20&quot; BGCOLOR=&quot;#66FFFF&quot;>
<div align=&quot;center&quot;><font face=&quot;Verdana&quot;><a href=&quot;#&quot; onMouseover=&quot;MM_showHideLayers('homoeo','','show','articles','','hide','clinic','','hide','about','','hide')&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Homoeopathy</font></a></font></div>
</td>
<td ALIGN=LEFT VALIGN=TOP WIDTH=&quot;112&quot; HEIGHT=&quot;20&quot; BGCOLOR=&quot;#66FFFF&quot;>
<div align=&quot;center&quot;><font face=&quot;Verdana&quot;><a href=&quot;const.htm&quot; target=&quot;mainFrame&quot; onMouseOver=&quot;MM_showHideLayers('clinic','','hide','articles','','hide','about','','hide','homoeo','','hide','search','','show')&quot;><font color=&quot;blue&quot; size=&quot;2&quot;>Search</font></a></font>
</div>
</td>
<td ALIGN=LEFT VALIGN=TOP WIDTH=&quot;5&quot; HEIGHT=&quot;20&quot;>
<center>
</center>
</td>
</tr>
</table>
<div id=&quot;clinic&quot; style=&quot;position:absolute; width:135px; height:100px; z-index:1; left: 4px; top: 19px; visibility: hidden; overflow: visible&quot;>
<table align=LEFT border=0 cellspacing=0 cellpadding=0 width=&quot;137&quot; >
<tr>
<td align=LEFT valign=TOP rowspan=&quot;5&quot; width=&quot;1&quot; bgcolor=&quot;#66FFFF&quot;>&nbsp;</td>
<td valign=TOP width=&quot;130&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;appoint.htm&quot; target=&quot;mainFrame&quot;><font color=&quot;blue&quot; size=&quot;2&quot;>Appointments</font></a></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;130&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;facility.htm&quot; target=&quot;mainFrame&quot;><font color=&quot;blue&quot; size=&quot;2&quot;>Facilities</font></a></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;130&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;casefol.htm&quot; target=&quot;mainFrame&quot;><font color=&quot;blue&quot; size=&quot;2&quot;>Case
Follow Ups</font></a></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;130&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;medkit.htm&quot; target=&quot;mainFrame&quot;><font color=&quot;blue&quot; size=&quot;2&quot;>Medicine
Kit</font></a></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;130&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;patients.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Patient
Awareness</font></a></font></td>
</tr>
</table>
</div>
<div id=&quot;faq&quot; style=&quot;position:absolute; width:94px; height:115px; z-index:5; left: 125px; top: 19px; visibility: hidden; overflow: visible&quot;></div>
<div id=&quot;articles&quot; style=&quot;position:absolute; width:87px; height:100px; z-index:2; left: 259px; top: 19px; visibility: hidden; overflow: visible&quot;>
<table align=LEFT border=0 cellspacing=0 cellpadding=0 width=&quot;90&quot; >
<tr>
<td align=LEFT valign=TOP rowspan=&quot;6&quot; width=&quot;10&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;>&nbsp;</font></td>
<td valign=TOP width=&quot;130&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;vaccine.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Vaccination</font></a></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;130&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;stories.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Stories</font></a></font>
</td>
</tr>
<tr>
<td valign=TOP width=&quot;130&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;steroids.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Steroids</font></a></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;130&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;OBESITY.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Obesity</font></a></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;130&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;diseases.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Diseases</font></a></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;130&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;meditate.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Meditation</font></a></font></td>
</tr>
</table>
</div>
<div id=&quot;about&quot; style=&quot;position:absolute; width:145px; height:115px; z-index:3; left: 390px; top: 19px; visibility: hidden; overflow: visible&quot;>
<table align=LEFT border=0 cellspacing=0 cellpadding=0 width=&quot;144&quot; >
<tr>
<td align=LEFT valign=TOP rowspan=&quot;6&quot; width=&quot;6&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot;>&nbsp;</font></td>
<td valign=TOP width=&quot;128&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot;><font size=-1><a href=&quot;rajan.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Dr.
Rajan Sankaran</font></a></font></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;128&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot;><font size=-1><a href=&quot;rashmi.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Dr.
Rashmi Jaising</font></a></font></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;128&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot;><font size=-1><a href=&quot;digesh.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Dr.
Digish Doshi</font></a></font></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;128&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot;><font size=-1><a href=&quot;deepali.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Dr.
Deepali Parikh</font></a></font></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;128&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot;><font size=-1><a href=&quot;parul.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Dr.
Parul Shah</font></a></font></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;128&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot;><font size=-1>
<a href=&quot;seminar.htm&quot; target =&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Seminars</font></a></font></font></td>
</tr>
</table>
</div>
<div id=&quot;homoeo&quot; style=&quot;position:absolute; width:142px; height:63px; z-index:4; left: 538px; top: 19px; visibility: hidden; overflow: visible&quot;>
<table align=LEFT border=0 cellspacing=0 cellpadding=0 width=&quot;146&quot; >
<tr>
<td align=LEFT valign=TOP rowspan=&quot;5&quot; width=&quot;6&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot;>&nbsp;</font></td>
<td valign=TOP width=&quot;134&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;abthom.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>About
Homoeopathy</font></a></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;134&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;misc.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Miscellaneous
Info</font></a></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;134&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><font size=&quot;2&quot; color=&quot;blue&quot;><a href=&quot;case.htm&quot;target=&quot;mainFrame&quot;>Case
form </a></font></font></td>
</tr>
<tr>
<td valign=TOP width=&quot;134&quot; height=&quot;20&quot; bgcolor=&quot;#66FFFF&quot;><font face=&quot;Verdana&quot; size=&quot;-1&quot;><a href=&quot;comments.htm&quot; target=&quot;mainFrame&quot;><font size=&quot;2&quot; color=&quot;blue&quot;>Comments</font></a></font></td>
</tr>
</table>
</div>
<div id=&quot;search&quot; style=&quot;position:absolute; width:67px; height:115px; z-index:6; left: 698px; top: 19px; visibility: hidden; overflow: visible&quot;></div>
</center>
</div>
</body>

Please if you can help.
 
This is the javascript.

<script language=&quot;JavaScript&quot;>
<!--
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf(&quot;?&quot;))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); return x;
}

function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
//-->
</script>
 
Ok .. the lowdown on DIV layers is that they are absolute positioned at a give pixel set (i.e. position:absolute; width:87px; height:100px; z-index:2) I haven't found a way to position:relative Div layers. ... I am still looking at it though. I had tried this one before but I found that it didn't work very well with using Div layers with tables like you are doing here unless you make your Tables absolutely positioned as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top