473,659 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Position 2 menus separately that share the same div tag

1 New Member
hi everyone, ive found a simple drop down menu script but for some reason there is only one div tag set for 2 menus.. and i want to position them seperately... ill give the css positioning of what i want:

Expand|Select|Wrap|Line Numbers
  1. position:absolute; top:40px; left:50%; margin-left:-100px;
  2. position:absolute; top:40px; left:50%; margin-left:-50px;
i want to position them like this... here is the script (im not putting the whole thing):

Expand|Select|Wrap|Line Numbers
  1. //Contents for menu 1
  2. var menu1=new Array()
  3. menu1[0]='<a href="118.htm">118 Social</a>'
  4. menu1[1]='<a href="alpha.htm">Alphabet (school)</a>'
  5. menu1[2]='<a href="bleed.htm">Bleeding Black</a>'
  6. menu1[3]='<a href="crimson.htm">Crimson</a>'
  7. menu1[4]='<a href="cup.htm">Cup Of Tea</a>'
  8. menu1[5]='<a href="final.htm">Final Project (school)</a>'
  9. menu1[6]='<a href="pano.htm">London Pranorama (school)</a>'
  10. menu1[7]='<a href="mag.htm">Magazine (school)</a>'
  11. menu1[8]='<a href="maths.htm">Maths World</a>'
  12. menu1[9]='<a href="redline.htm">Redline</a>'
  13. menu1[10]='<a href="under.htm">Underground Video (school)</a>'
  14.  
  15.  
  16. //Contents for menu 2, and so on
  17. var menu2=new Array()
  18. menu2[0]='<a href="photo.htm">Photography</a>'
  19. menu2[1]='<a href="manip.htm">Manipulation</a>'
  20. menu2[2]='<a href="vector.htm">Vector</a>'
  21.  
  22. var menuwidth='150px' //default menu width
  23. var menubgcolor='black'  //menu bgcolor
  24. var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
  25. var hidemenu_onclick="yes" //hide menu when user clicks within menu?
  26.  
  27. /////No further editting needed
  28.  
  29. var ie4=document.all
  30. var ns6=document.getElementById&&!document.all
  31.  
  32. if (ie4||ns6)
  33. document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
  34.  
  35. function getposOffset(what, offsett
Sep 6 '07 #1
2 1278
gits
5,390 Recognized Expert Moderator Expert
hi ...

welcome to TSDN ...

please use code-tags when posting code ... not the simple text-formatting options like bold or italic ... code tags are used for syntax-highlighting etc. so the reader gets help to read your code and is able to find out the problems much faster ...

kind regards
Sep 7 '07 #2
acoder
16,027 Recognized Expert Moderator MVP
Changed the thread title. Please use a good thread title.
Sep 7 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1325
by: fleemo17 | last post by:
IE5 (5.2.3) for the Mac seems to be having problems displaying page elements using Position attributes. If I place the position of my form box (shown at http://tinyurl.com/cz5xd ) using "absolute," the CSS drop-down menus no longer function. If I position it using "relative," the drop-downs function ok, but the form's input box and submit button disappear! Complete chaos. The page works fine in IE6, Firefox, Netscape 7.1 on the PC and...
3
2038
by: Matthias Lohrer | last post by:
Hi, my XML-Document hat this structure <book> <section> <para /> <para /> </section> <section> <para />
0
3534
by: cefrancke | last post by:
I recently discovered, that if you set the startup options for "security", you will have alot of work do to get Access back to "normal". If you disable the built-in menus/toolbars you'll have to reconstruct the one you want as a custom menu/shortcut(popup)/toolbar. All this was a long journey in order to allow the user to sort/copy on a datasheet view of a subform, with all the menus disabled in the startup options.
3
6438
by: moondaddy | last post by:
I'm trying to create my first user control and its function is to replace the use of a frames page. I want to position it under the pages header menus and to the right of the pages contents menus. How can I set the top and left position of this control? -- moondaddy@nospam.com
2
2396
by: Eric Lindsay | last post by:
I have been trying to do a CSS liquid layout imitating a frame, using position: fixed for header, footer, and side navigation, and a fixed background image. Page is valid HTML 4.01 Strict, and is at http://www.ericlindsay.com/palmtop/palmnote.htm and the CSS is valid (with colour warnings but no errors) at http://www.ericlindsay.com/palmtop/palmtoptest.css All the other pages in that directory use my four year old stylesheet (so don't...
0
1566
by: tony.spalding | last post by:
I'm having a problem trying to add a link to my add-in to a context menu. I'm trying to add it to the context menu that you get when you right click on a stored procedure within the Server Explorer and there are a number of problems that I've hit. I'm using VS.NET2005 and am trying to debug the add-in, so when running it it loads up another instance of the IDE. As I've experienced a number of strange scenarios I'm going to list them...
2
5358
by: drillbatting | last post by:
Hi, I have a site with a heap of small menus in various elements. It looks something like this (inline style's etc for readability): <div>
9
51981
chunk1978
by: chunk1978 | last post by:
hey everyone, i've been trying to solve this problem for 2 days straight, with no end in sight. i would greatly appreciate anyone's help. EXPLANATION: There are 3 Select Menus. The 1st and 2nd Select Menu are "printing options" for 4x6 and 5x7 prints respectively. the 3rd Select Menu holds an "Email" option that can be toggled (appear/reappear) by the 1st and 2nd Select Menus. So if a user selects prints from either 4x6 or 5x7 menu,...
41
2594
by: Stan Brown | last post by:
As usual, it looks right in Firefox 3 but not in IE6. See http://www.tc3.edu/instruct/sbrown/nicholls/indexgood.htm for the desired behavior -- when you hover over the second or third main menu item, a submenu appears and an item can be selected. (The links don't go anywhere.) This works in FF and IE. The style sheet is http://www.tc3.edu/instruct/sbrown/prodrop4.css But when I include my own style sheet
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8525
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.