Forum Moderators: open
There is some SQL, which populates all of this written before.
echo "<div STYLE='position:absolute;top:160; left:220; z-index:6000;' >";
echo "<br /> Click...blah blah blah:";
echo "<ul id='nav'>";
$i=0;
while ($i < $num2) {
$a = mysql_result($result2,$i,"a") or die(mysql_error());
$b = mysql_result($result2,$i,"b") or die(mysql_error());
$c = mysql_result($result2,$i,"c") or die(mysql_error());
$d = mysql_result($result2,$i,"d") or die(mysql_error());
echo " <li><a>".$a."</a>
<ul>
<li><a href='audio.php?a=".$a."'>Submenu 1</a>
</li>
";
if ($b > 0)
{
echo "<li><a href='audio.php?b=".$b."'>Submenu 2</a></li>";
}
if (strlen($c) > 2)
{
echo "<li><a href='audio.php?c=".$c."'>Submenu 3</a></li>";
}
echo "
</ul>
</li>";
$i++;
} //end while loop
echo "</ul>";
echo "</div>";
and here is the CSS:
#nav, #nav ul {
padding: 0;
margin: 0;
list-style: none;
color: black;
}
#nav a {
display: block;
width: 10em;
color: yellow;
background: blue;
font-weight :bold;
padding: 3px;
border: 1px solid #ccc;
border-bottom: 0;
text-decoration: none;
}
#nav a:hover {
display: block;
width: 10em;
color: yellow;
background: 0099FF;
font-weight :bold;
padding: 3px;
border: 1px solid #ccc;
border-bottom: 0;
}
#nav li {
float: left;
width: 10em;
position: relative;
border-bottom: 1px solid #ccc;
}
#nav li ul {
position: absolute;
width: 10em;
left: -999em;
color: #777;
background: #fff;
padding: 0px;
border: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
#nav li:hover ul, #nav li.sfhover ul {
left: auto;
}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
* html ul li a { height: 1%; }
/* End */
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; height: 1%; }
* html ul li a { height: 1%; }
/* End */