colin_palmer
asked on
Simple Menu using CSS and DIV tags
Hi Experts
The code below shows a simple menu using CSS and DIV tags. When you mouseover a link, a slide out menu appears.
What I want to do is when you mouseover a link e.g. LINK THREE, then mouseover item 4 within LINK THREE another slide out menu appears to the side of it.
How do I apply this to my code?
See below for code
LINK ONE LINK TWO LINK THREE
item 1 item 1 item 2
item 2 item 3
item 4 > item1
item2
item3
****** CSS File ********
.menu
{
font-family: Lucida Sans;
text-align:center;
font-size: 80%;
position:absolute; top:5px;width:100px;
color:white;
border:1px solid white
}
.sub
{
background-color:#CCCCCC;
color:black;
}
****** HTML Code *******
<script type="text/javascript" language="javascript">
function SelectItem(menu)
{
menu.childNodes[1].style.d isplay = "block";
}
function HideItem(menu)
{
menu.childNodes[1].style.d isplay = "none";
}
</script>
<div style="width: 110px; left:75px;" class="menu">
<a href="default.html">Home</ a>
</div>
<div style="width: 110px; left:185px;" class="menu" onMouseOver="SelectItem(th is)" onMouseOut="HideItem(this) ">
How To
<div class="sub" style="width: 110px; display: none;">
<a href="NotAvailable.html">B uild a PC</a>
<br>
<a href="NotAvailable.html">B uild a Website</a>
</div>
</div>
<div style="width: 110px; left:295px;" class="menu" onMouseOver="SelectItem(th is)" onMouseOut="HideItem(this) ">
Special Interests
<div class="sub" style="width: 110px; display: none;">
<a href="NotAvailable.html">C ars</a>
</div>
</div>
<div style="width: 110px; left:405px;" class="menu">
<a href="NotAvailable.html">R eference</ a>
</div>
<div style="width: 110px; left:515px;" class="menu">
<a href="NotAvailable.html">A bout us</a>
</div>
The code below shows a simple menu using CSS and DIV tags. When you mouseover a link, a slide out menu appears.
What I want to do is when you mouseover a link e.g. LINK THREE, then mouseover item 4 within LINK THREE another slide out menu appears to the side of it.
How do I apply this to my code?
See below for code
LINK ONE LINK TWO LINK THREE
item 1 item 1 item 2
item 2 item 3
item 4 > item1
item2
item3
****** CSS File ********
.menu
{
font-family: Lucida Sans;
text-align:center;
font-size: 80%;
position:absolute; top:5px;width:100px;
color:white;
border:1px solid white
}
.sub
{
background-color:#CCCCCC;
color:black;
}
****** HTML Code *******
<script type="text/javascript" language="javascript">
function SelectItem(menu)
{
menu.childNodes[1].style.d
}
function HideItem(menu)
{
menu.childNodes[1].style.d
}
</script>
<div style="width: 110px; left:75px;" class="menu">
<a href="default.html">Home</
</div>
<div style="width: 110px; left:185px;" class="menu" onMouseOver="SelectItem(th
How To
<div class="sub" style="width: 110px; display: none;">
<a href="NotAvailable.html">B
<br>
<a href="NotAvailable.html">B
</div>
</div>
<div style="width: 110px; left:295px;" class="menu" onMouseOver="SelectItem(th
Special Interests
<div class="sub" style="width: 110px; display: none;">
<a href="NotAvailable.html">C
</div>
</div>
<div style="width: 110px; left:405px;" class="menu">
<a href="NotAvailable.html">R
</div>
<div style="width: 110px; left:515px;" class="menu">
<a href="NotAvailable.html">A
</div>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER