Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript drop down using tables

Status
Not open for further replies.

Grimblam

Programmer
Sep 27, 2004
9
GB
Hi,

I've got a web page with a basic menu along the top with links to different pages. This menu is layed out using tables and i've added some javascript effects to put up a description of where the link goes. I was hoping to also add javascript drop down menus to some of the links but am not really sure how to do it. Most of the javascript drop down menu code on the interweb is based around <div> layout of the menu but I was hoping to avoid changing my basic table layout that I have at the moment. Does anyone have any drop down menus that use tables at the top with divs (or any other means) for the drop down elements? Is this possible (i'm a newbie)? The code for the table i'm using is below.

Cheers,
Andy

Code:
<table  border="0" align="center" cellpadding="0" cellspacing="0" vspace="0">
<tr align="left">	
								
<td onMouseOver="setMenuComment('main');" onMouseOut="setBlankComment();"><a alt="AG Main" href="main.htm">main</a></td>
					
<td class="menuBar" onMouseOver="setMenuComment('cv');" onMouseOut="setBlankComment();"><a alt="cv" href="cv.htm">curriculum vitae</a></td>
					
<td class="menuBar" onMouseOver="setMenuComment('downloads');" onMouseOut="setBlankComment();"><a alt="file download" href="downloads.htm">downloads</a></td> 
					
<td class="menuBar" onMouseOver="setMenuComment('links');" onMouseOut="setBlankComment();"><a alt="links" href="links.htm">links</a></td>
					
<td class="menuBar" bgcolor="#DDDDDD" style="border-right:0px solid #DCDCDC"><a href="">&nbsp;</a></td>
					
</tr>
</table>
 
Try that DIV option. You can put DIV tags within a table cell (i.e., in between the open- and close-TD tags).

--Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top