Hi -
I have a CSS/JavaScript menu. I want to place it within a cell of a table.
Here is the CSS:
<style type="text/css">
a
{
text-decoration: none;
color: #FFFFFF;
}
.title
{position: relative;
width: 200x;
height: 20px;
left: 10px;
z-index: 10;
font-family: verdana, helvetica, sans-serif;
font-weight: bold;
font-size: 14px;}
.submenu
{position: absolute;
width: 200px;
font-family: verdana, helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
visibility: hidden;}
</style>
Here's the cell the menu is in:
<td>
<div class="title" id="title1">
<a href="#" onclick="javascript: toggle(1,30); return false"><img name="pic1" src="images/closed.gif" border="0">Category 1</a>
</div>
<div class="submenu" id="submenu1">
<a href="page01.html" target="right">Item # 1</a><br>
<a href="page02.html" target="right">Item # 2</a>
</div>
<div class="title" id="title2">
<a href="#" onclick="javascript: toggle(2,60); return false"><img name="pic2" src="images/closed.gif" border="0">Category 2</a>
</div>
<div class="submenu" id="submenu2">
<a href="page03.html" target="right">Item # 3</a><br>
<a href="page04.html" target="right">Item # 4</a><br>
<a href="page05.html" target="right">Item # 5</a><br>
<a href="page06.html" target="right">Item # 6</a>
</div>
</td>
Submenu1 appears directly under the Category 1 heading when it is clicked. However, Submenu2 appears at the top of the page.
Can anyone please let me know what I'm doing wrong? Any help is greatly appreciated. Thank you!
-DVD Girl
I have a CSS/JavaScript menu. I want to place it within a cell of a table.
Here is the CSS:
<style type="text/css">
a
{
text-decoration: none;
color: #FFFFFF;
}
.title
{position: relative;
width: 200x;
height: 20px;
left: 10px;
z-index: 10;
font-family: verdana, helvetica, sans-serif;
font-weight: bold;
font-size: 14px;}
.submenu
{position: absolute;
width: 200px;
font-family: verdana, helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
visibility: hidden;}
</style>
Here's the cell the menu is in:
<td>
<div class="title" id="title1">
<a href="#" onclick="javascript: toggle(1,30); return false"><img name="pic1" src="images/closed.gif" border="0">Category 1</a>
</div>
<div class="submenu" id="submenu1">
<a href="page01.html" target="right">Item # 1</a><br>
<a href="page02.html" target="right">Item # 2</a>
</div>
<div class="title" id="title2">
<a href="#" onclick="javascript: toggle(2,60); return false"><img name="pic2" src="images/closed.gif" border="0">Category 2</a>
</div>
<div class="submenu" id="submenu2">
<a href="page03.html" target="right">Item # 3</a><br>
<a href="page04.html" target="right">Item # 4</a><br>
<a href="page05.html" target="right">Item # 5</a><br>
<a href="page06.html" target="right">Item # 6</a>
</div>
</td>
Submenu1 appears directly under the Category 1 heading when it is clicked. However, Submenu2 appears at the top of the page.
Can anyone please let me know what I'm doing wrong? Any help is greatly appreciated. Thank you!
-DVD Girl