JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old May 24th, 2003, 10:07 PM
Volitics Volitics is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Knoxville, Tennessee (U.S.A.)
Posts: 58 Volitics User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 15 sec
Reputation Power: 6
How Do I Align Drop-Down Menus?

Does anyone know how I can get the drop-down menu (the code at the bottom below) to align with the stationery link (the code at the top)?

What I'm wanting to do is have three or four stationery links and position them in the center of the page. The widths of the table cells will vary a little bit for each of the stationery links. Each of the stationery links will have a drop down menu.

The code below is only one stationery link and one drop-down menu.

If I align everything over against the left margin it works fine. However, I need to center the page.

I have not posted the portion of the JavaScript that goes in the heading of the HTML page.

PHP Code:
//---This link is the stationery link
<div align="center">
<
table border="1" cellpadding="4" width=500>
<
tr>
   <
td ID="menu-products" width="100" bgcolor="Silver"
      
onMouseOver="Menu('products');" onMouseOut="Timeout('products');">
     <
a href="products.html"><b>Products</b></a>
   </
td></tr>
</
table></div>


//-- This menu drops down when the mouse passes over the above link
<div ID="products" STYLE="position:absolute; visibility: hidden">
  <
table width="100%" border="0" cellpadding="4" cellspacing="0">
  <
tr> <td width="100%" ID="p1"
     
onMouseOver="Highlight('products','p1');"
     
onMouseOut="UnHighlight('products','p1');">
  <
a href="equip.html">Equipment</a></td></tr>
  <
tr> <td width="100%" ID="p2"
     
onMouseOver="Highlight('products','p2');"
     
onMouseOut="UnHighlight('products','p2');">
  <
a href="supplies.html">Supplies</a></td></tr>
  </
table>
</
div

Thanks;

Volitics

Reply With Quote
  #2  
Old May 25th, 2003, 07:07 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 6 m 11 sec
Reputation Power: 8
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Tables are usually the best way to go. CSS would be "proper" way to do it tho - using DIV absolute positioning. Just google for CSS positioning - there's heaps of tutorials out there on it.
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #3  
Old September 5th, 2005, 07:57 PM
carlodn carlodn is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 1 carlodn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 33 sec
Reputation Power: 0
How Do I Align Drop-Down Menus

I am having the exact same problem. Does anyone know how to align drop-down menus to static links in a "centered" web page...my example is at http://www.qsesupplements.com/enter.htm.

the script i used aligns the drop-down menus relative to the top left corner of the browser. i would like it to align it relative to the top left corner of the web page, so when i center the web page, the drop down menus will center with it.
don't know if this is possible?

i appreciate any help
thanks
c


Quote:
Originally Posted by Volitics
Does anyone know how I can get the drop-down menu (the code at the bottom below) to align with the stationery link (the code at the top)?

What I'm wanting to do is have three or four stationery links and position them in the center of the page. The widths of the table cells will vary a little bit for each of the stationery links. Each of the stationery links will have a drop down menu.

The code below is only one stationery link and one drop-down menu.

If I align everything over against the left margin it works fine. However, I need to center the page.

I have not posted the portion of the JavaScript that goes in the heading of the HTML page.

PHP Code:
//---This link is the stationery link
<div align="center">
<
table border="1" cellpadding="4" width=500>
<
tr>
   <
td ID="menu-products" width="100" bgcolor="Silver"
      
onMouseOver="Menu('products');" onMouseOut="Timeout('products');">
     <
a href="products.html"><b>Products</b></a>
   </
td></tr>
</
table></div>


//-- This menu drops down when the mouse passes over the above link
<div ID="products" STYLE="position:absolute; visibility: hidden">
  <
table width="100%" border="0" cellpadding="4" cellspacing="0">
  <
tr> <td width="100%" ID="p1"
     
onMouseOver="Highlight('products','p1');"
     
onMouseOut="UnHighlight('products','p1');">
  <
a href="equip.html">Equipment</a></td></tr>
  <
tr> <td width="100%" ID="p2"
     
onMouseOver="Highlight('products','p2');"
     
onMouseOut="UnHighlight('products','p2');">
  <
a href="supplies.html">Supplies</a></td></tr>
  </
table>
</
div

Thanks;

Volitics

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > How Do I Align Drop-Down Menus?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway