[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

problem with multiple <divs> that overlap--does not display correctly

Asked by Camner in Hypertext Markup Language (HTML)

Tags: mm_open


I'm trying to create a 3 row by 4 column picture array using <div> tags.
Because I want some rollover and click effects, I'm also stacking each cell
entry 3 deep (for a total of 36 <div>s).  12 are initially visible, and the
other two on top become visible upon mouseovers and clicks.

The javascript actions work as they should.

The problem:  in Dreamweaver, where I developed this, the 3x4 array is perfect.  When browsed with IE and NS, many of the pix are on top of each other.  Since the page renders the same in IE and in NS, I'm figuring it's a code problem rather than a browser incompatibility.

For whatever it’s worth, I did this by making a single cell work as I want, then cut and pasted the code 11 more times, and then modified the position parameters and I started to change out the picture references.  The latter step is (obviously) not complete.

Any help would be appreciated (comments about how to shorten the code would be welcome, too!).


The (lengthy!) code follows below:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>What's Laura's Favorite Animal?</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
//the function below shows and hides layers by toggling the visibility state
function showorhide1(imgname,f){
if(f){visi="visible";}
else{visi="hidden";}

if(document.layers){//NS4
document[imgname].visibility=visi;
}

else if(document.all){// IE 4+
document.all[imgname].style.visibility=visi;
}

else if(document.getElementById){// NS6+
document.getElementById([imgname]).style.visibility=visi;
}

}


// -->

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</SCRIPT>



    

<link href="../../../common_styles.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="titletext" style="position:absolute; width:100%; height:43px; z-index:37; left: 0px; top: 7px;">
  <p class="greentitletext">Can you guess Laura&#8217;s favorite animal?</p>
</div>
<!--R1,C1 dinosaur -->
<div id="din1" style="position:absolute; width:175px; height:125px; z-index:3; left: 20; top: 100px; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('din2',1);" onMouseOut="showorhide1('din2',0);"
       onClick="showorhide1('din3',1);showorhide1('din2',0);MM_openBrWindow('dinosaurs-lg.htm','dinosaurs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="dinosaurs-sm.jpg" width="175" height="125" border="0"></a>
</div>
<div id="din2" style="position:absolute; width:175px; height:125px; z-index:2; left: 20; top: 100px; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('din3',1);showorhide1('din2',0);MM_openBrWindow('dinosaurs-lg.htm','dinosaurs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="din3" style="position:absolute; width:175px; height:125px; z-index:1; left: 20px; top: 100px; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>
<!--R2,C1 pig -->
<div id="pig1" style="position:absolute; width:175px; height:125px; z-index:6; left: 20; top: 250px; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('pig2',1);" onMouseOut="showorhide1('pig2',0);"
       onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="pig-sm.jpg" width="175" height="125" border="0"></a>
</div>
<div id="pig2" style="position:absolute; width:175px; height:125px; z-index:5; left: 20; top: 250px; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="pig3" style="position:absolute; width:175px; height:125px; z-index:4; left: 20; top: 250px; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>

<!--R3,C1 elephant -->
<div id="ele1" style="position:absolute; width:175px; height:125px; z-index:9; left: 20; top: 400px; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('ele2',1);" onMouseOut="showorhide1('ele2',0);"
       onClick="showorhide1('ele3',1);showorhide1('ele2',0);MM_openBrWindow('elephant-lg.htm','elephant','scrollbars=no,resizable=yes,width=600,height=730')">
    <img src="elephant-sm.jpg" width="125" height="175" border="0"></a>
</div>
<div id="ele2" style="position:absolute; width:175px; height:125px; z-index:8; left: 20; top: 400px; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('ele3',1);showorhide1('ele2',0);MM_openBrWindow('elephant-lg.htm','pigs','scrollbars=no,resizable=yes,width=600,height=730')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="ele3" style="position:absolute; width:175px; height:125px; z-index:7; left: 20; top: 400px; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>

<!--R1,C2 dog -->
<div id="dog1" style="position:absolute; width:175px; height:125px; z-index:12; left: 215; top: 100px; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('din2',1);" onMouseOut="showorhide1('din2',0);"
       onClick="showorhide1('din3',1);showorhide1('din2',0);MM_openBrWindow('dinosaurs-lg.htm','dinosaurs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="dinosaurs-sm.jpg" width="175" height="125" border="0"></a>
</div>
<div id="dog2" style="position:absolute; width:175px; height:125px; z-index:11; left: 215; top: 100px; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('din3',1);showorhide1('din2',0);MM_openBrWindow('dinosaurs-lg.htm','dinosaurs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="dog3" style="position:absolute; width:175px; height:125px; z-index:10; left: 215; top: 100px; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>
<!--R2,C2 cow -->
<div id="cow1" style="position:absolute; width:175px; height:125px; z-index:15; left: 215; top: 250px; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('pig2',1);" onMouseOut="showorhide1('pig2',0);"
       onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="pig-sm.jpg" width="175" height="125" border="0"></a>
</div>
<div id="cow2" style="position:absolute; width:175px; height:125px; z-index:14; left: 215; top: 250px; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="cow3" style="position:absolute; width:175px; height:125px; z-index:13; left: 215; top: 250px; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>

<!--R3,C2 gorilla -->
<div id="gor1" style="position:absolute; width:175px; height:125px; z-index:18; left: 215; top: 400px; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('gor2',1);" onMouseOut="showorhide1('gor2',0);"
       onClick="showorhide1('gor3',1);showorhide1('gor2',0);MM_openBrWindow('gregory-lg.htm','gorilla','scrollbars=no,resizable=yes,width=600,height=730')">
    <img src="gregory-sm.jpg" width="128" height="160" border="0"></a>
</div>
<div id="gor2" style="position:absolute; width:175px; height:125px; z-index:17; left: 215; top: 400px; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('gor3',1);showorhide1('gor2',0);MM_openBrWindow('gregory-lg.htm','gorilla','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="gor3" style="position:absolute; width:175px; height:125px; z-index:16; left: 215; top: 400px; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>
<!--R1,C3 fish -->
<div id="fish1" style="position:absolute; width:175px; height:125px; z-index:21; left: 410px; top: 100px; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('din2',1);" onMouseOut="showorhide1('din2',0);"
       onClick="showorhide1('din3',1);showorhide1('din2',0);MM_openBrWindow('dinosaurs-lg.htm','dinosaurs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="dinosaurs-sm.jpg" width="175" height="125" border="0"></a>
</div>
<div id="fish2" style="position:absolute; width:175px; height:125px; z-index:20; left: 410px; top: 100px; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('din3',1);showorhide1('din2',0);MM_openBrWindow('dinosaurs-lg.htm','dinosaurs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="fish3" style="position:absolute; width:175px; height:125px; z-index:19; left: 410px; top: 100px; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>

<!--R2,C3 goat -->
<div id="goat1" style="position:absolute; width:175px; height:125px; z-index:24; left: 410px; top: 250px; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('pig2',1);" onMouseOut="showorhide1('pig2',0);"
       onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="pig-sm.jpg" width="175" height="125" border="0"></a>
</div>
<div id="goat2" style="position:absolute; width:175px; height:125px; z-index:23; left: 410px; top: 250px; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="goat3" style="position:absolute; width:175px; height:125px; z-index:22; left: 410px; top: 250px; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>

<!--R3,C3 grizzly bear -->
<div id="bear1" style="position:absolute; width:175px; height:125px; z-index:27; left: 410px; top: 400; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('pig2',1);" onMouseOut="showorhide1('pig2',0);"
       onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="pig-sm.jpg" width="175" height="125" border="0"></a>
</div>
<div id="bear2" style="position:absolute; width:175px; height:125px; z-index:26; left: 410px; top: 400; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="bear3" style="position:absolute; width:175px; height:125px; z-index:25; left: 410px; top: 400; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>

<!--R1,C4 giraffe -->
<div id="giraffe1" style="position:absolute; width:175px; height:125px; z-index:30; left: 605px; top: 100px; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('din2',1);" onMouseOut="showorhide1('din2',0);"
       onClick="showorhide1('din3',1);showorhide1('din2',0);MM_openBrWindow('dinosaurs-lg.htm','dinosaurs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="dinosaurs-sm.jpg" width="175" height="125" border="0"></a>
</div>
<div id="giraffe2" style="position:absolute; width:175px; height:125px; z-index:29; left: 605px; top: 100px; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('din3',1);showorhide1('din2',0);MM_openBrWindow('dinosaurs-lg.htm','dinosaurs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="giraffe3" style="position:absolute; width:175px; height:125px; z-index:28; left: 605px; top: 100px; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>
<!--R2,C4 snake -->
<div id="snake1" style="position:absolute; width:175px; height:125px; z-index:33; left: 605px; top: 250px; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('pig2',1);" onMouseOut="showorhide1('pig2',0);"
       onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="pig-sm.jpg" width="175" height="125" border="0"></a>
</div>
<div id="snake2" style="position:absolute; width:175px; height:125px; z-index:32; left: 605px; top: 250px; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="snake3" style="position:absolute; width:175px; height:125px; z-index:31; left: 605px; top: 250px; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>

<!--R3,C4 rhino -->
<div id="rhino1" style="position:absolute; width:175px; height:125px; z-index:36; left: 605px; top: 400; visibility: visible;">
    <a href="javascript:void(0)" onMouseOver="showorhide1('pig2',1);" onMouseOut="showorhide1('pig2',0);"
       onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="pig-sm.jpg" width="175" height="125" border="0"></a>
</div>
<div id="rhino2" style="position:absolute; width:175px; height:125px; z-index:35; left: 605px; top: 400; visibility: hidden;">
    <a href="javascript:void(0)" onClick="showorhide1('pig3',1);showorhide1('pig2',0);MM_openBrWindow('pig-lg.htm','pigs','scrollbars=no,resizable=yes,width=730,height=600')">
    <img src="laheadheart.gif" width="175" height="125" border="0"></a>
</div>
<div id="rhino3" style="position:absolute; width:175px; height:125px; z-index:34; left: 605px; top: 400; visibility: hidden;">
    <img src="laheadheartno.gif" width="175" height="125" border="0">
</div>


</body>
</html>
 


[+][-]04/08/03 03:14 PM, ID: 8295468Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Hypertext Markup Language (HTML)
Tags: mm_open
Sign Up Now!
Solution Provided By: modulo
Participating Experts: 5
Solution Grade: A
 
[+][-]04/07/03 11:19 AM, ID: 8285958Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/07/03 11:45 AM, ID: 8286092Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/07/03 11:54 AM, ID: 8286149Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/07/03 12:38 PM, ID: 8286387Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/07/03 12:54 PM, ID: 8286497Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/07/03 01:09 PM, ID: 8286614Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/07/03 02:08 PM, ID: 8287024Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/07/03 02:12 PM, ID: 8287053Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/07/03 06:11 PM, ID: 8288278Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/07/03 06:52 PM, ID: 8288398Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/07/03 06:56 PM, ID: 8288407Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/07/03 07:39 PM, ID: 8288556Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/07/03 08:25 PM, ID: 8288705Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/07/03 10:31 PM, ID: 8289272Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/08/03 12:03 AM, ID: 8289718Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/08/03 12:25 AM, ID: 8289814Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/08/03 12:28 AM, ID: 8289830Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/08/03 09:28 AM, ID: 8292961Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93