Hi guys!

I have a code-snippet here:

while ($dbArray = mysql_fetch_array($querys)) {
$dbIDLevel1 = $dbArray["IDLevel1"];
$dbLevel1Name = $dbArray["level1Name"];
$dbFactsLevel1Name = $dbArray["factsLevel1Name"];
$dbFactsPictureLevel1Name = $dbArray["factsPictureLevel1Name"];
?>
<div id="factsmenu_<?php echo $dbIDLevel1;?>" name="factsmenu_<?php echo $dbIDLevel1;?>" style="position:absolute; width:250px; height:300px; z-index:<?php echo 200 + $dbIDLevel1;?>; left: <?php echo $xTextledins + 310;?>px; top: <?php echo $yRightmenu;?>px; overflow: auto; visibility: hidden">
<p class="textstyle"><b><?php echo $dbLevel1Name;?></b><br>
<img src="pictures/level1/<?php echo $dbFactsPictureLevel1Name;?>" align="top" width="200" height="150"><br>
<?php echo $dbFactsLevel1Name;?></p>
</div>

<div id="rightmenu_<?php echo $dbIDLevel1;?>" name="rightmenu_<?php echo $dbIDLevel1;?>" style="position:absolute; width:150px; height:300px; z-index:<?php echo 100 + $dbIDLevel1;?>; left: <?php echo $xTextledins + 130;?>px; top: <?php echo $yMenu;?>px; overflow: auto; visibility: hidden">
<p class="textstyle">
<?php
$sql2 = "SELECT tblevel2catlevel1cat.ForIDLevel1Cat, tblevel2catlevel1cat.ForIDLevel2Cat, tblevel2cat.IDLevel2, tblevel2cat.level2Name FROM tblevel2catlevel1cat"; $sql2 .= " LEFT JOIN tblevel2cat ON (tblevel2cat.IDLevel2 = tblevel2catlevel1cat.ForIDLevel2Cat)"; $sql2 .= " WHERE tblevel2catlevel1cat.ForIDLevel1Cat = " . safeQuote($dbIDLevel1);
       $querys2 = mysql_query($sql2);

       $nrRows++;
       while ($dbArray2 = mysql_fetch_array($querys2)) {
       $dbIDLevel2 = $dbArray2["IDLevel2"];
       $dbLevel2Name = $dbArray2["level2Name"];
       ?>
<a href="page_productarea2.php?ID=<?php echo $dbIDLevel2;?>" title="<?php echo $dbLevel2Name;?>"><font color="#015730"><?php echo $dbLevel2Name;?></font></a><br>
       <?php
       $nrRows++;
       }
       ?>
       </p>
       </div>
<?php
//Here...
$yMenu +=(8*intval($nrRows));
}


If you don't bother about the database:

You'll see that two div-elements are created. I want "rightmenu_<?php echo $dbIDLevel1;?>" to be at the same vertical level as div-element: "factsmenu_<?php echo $dbIDLevel1;?>"

Any ideas? (I tried with $yMenu +=(8*intval($nrRows)) with the rule that any row is 8 pixels, but this doesn't seem to be true)

/G

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to