HighDots Forums  

dropdown menu...can this be done?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss dropdown menu...can this be done? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kinane3@yahoo.com
 
Posts: n/a

Default dropdown menu...can this be done? - 03-17-2006 , 01:46 PM






Mostly I need to figure if I'm wasting my time or if there is a way to
do what I am trying to do. I am an intermediate to CSS at best so
please don't flame me, just trying to do my job here.

I came across this article when I searched for a CSS solution to long
winded DHTML dropdown menus.
http://www.alistapart.com/articles/dropdowns/ I did get it to work but
here's my problem. What I "did" get to work was a horizontal drop in a
single table cell, e.g. I have this large opening background image in
single cell with this menu residing inside of it. Here it works fine.
I have another page where I have the same style dropmenu (vertical in
this case). It drops fine. My problem: the menu resides in a cell
with a background at the top of the page. The menu drops over the cell
below but when the primary hover target (for lack of a better way to
describe it) loses focus the sub items disappear.

My question: are the dropped sub-items disappearing because this can't
be done across table cells? Or is there a way to do this? Here are
the relevant items from the style sheet. The html that I am using is
below this. This is an IE js that is also needed but I've left it out
unless someone thinks it will help with an answer.

Thanks!

ul { /* all lists */
padding: 0;
margin: 0;
list-style: none;
font-size: 12px;
}

li { /* all list items */
float: left;
position: relative;
width: 100px;
padding : 5px;
}

li ul { /* second-level lists */
display: none;
position: absolute;
top: 30px;
left: 0;
}

li>ul { /* to override top and left in browsers other than IE, which
will position to the top right of the containing li, rather than bottom
left */
top: auto;
left: auto;
}

li:hover ul, li.over ul { /* lists nested under hovered list items */
display: block;
}

#content {
clear: left;
}


<body>

<table cellpadding="20" cellspacing="0" border="0" align="center"
width="100%" height="100%" class="outterBody">
<tr>
<td align="center" valign="middle" height="550"><!--outterBody Cell
opens here -->
<table border="0" cellpadding="0" cellspacing="0" width="750"
height="550" class="innerBody"><!--innerBody table starts here-->
<tr>
<td background="newBanner.jpg" width="750" height="140">&nbsp;
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="100">&nbsp;

</td>
</tr>
<tr>
<td height="25" align="right">
<ul id="nav">
<li><a href="#">About Us</a></li>
<li><a href="#">News</a>
<ul>
<li><a href="#">News</a></li>
<li><a href="#">Events Calendar</a></li>
<li><a href="#">Announcements</a></li>
</ul>
</li>
<li><a href="#">Consulting</a>
<ul>
<li><a href="#">Quality Management Systems</a></li>
<li><a href="#">Laboratory Accreditation</a></li>
<li><a href="#">Environmental Management Systems</a></li>
</ul>
</li>
<li><a href="#">Training</a>
<ul>
<li><a href="#">Quality Management</a></li>
<li><a href="#">Business Management</a></li>
<li><a href="#">Operations Management</a></li>
</ul>
</li>
<li><a href="#">Other Services</a></li>
<li><a href="#">Resources</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</td>
</tr>
</table>
</td>
</tr>
<td>&nbsp;

</td>
</tr>
</table>
</td>
</tr>
</table>

</body>


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.