Position 2 menus separately that share the same div tag

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DruManiac
    New Member
    • Sep 2007
    • 1

    Position 2 menus separately that share the same div tag

    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:

    Code:
    position:absolute; top:40px; left:50%; margin-left:-100px;
    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):

    [code=javascript]//Contents for menu 1
    var menu1=new Array()
    menu1[0]='<a href="118.htm"> 118 Social</a>'
    menu1[1]='<a href="alpha.htm ">Alphabet (school)</a>'
    menu1[2]='<a href="bleed.htm ">Bleeding Black</a>'
    menu1[3]='<a href="crimson.h tm">Crimson</a>'
    menu1[4]='<a href="cup.htm"> Cup Of Tea</a>'
    menu1[5]='<a href="final.htm ">Final Project (school)</a>'
    menu1[6]='<a href="pano.htm" >London Pranorama (school)</a>'
    menu1[7]='<a href="mag.htm"> Magazine (school)</a>'
    menu1[8]='<a href="maths.htm ">Maths World</a>'
    menu1[9]='<a href="redline.h tm">Redline</a>'
    menu1[10]='<a href="under.htm ">Undergrou nd Video (school)</a>'


    //Contents for menu 2, and so on
    var menu2=new Array()
    menu2[0]='<a href="photo.htm ">Photograp hy</a>'
    menu2[1]='<a href="manip.htm ">Manipulat ion</a>'
    menu2[2]='<a href="vector.ht m">Vector</a>'

    var menuwidth='150p x' //default menu width
    var menubgcolor='bl ack' //menu bgcolor
    var disappeardelay= 250 //menu disappear speed onMouseout (in miliseconds)
    var hidemenu_onclic k="yes" //hide menu when user clicks within menu?

    /////No further editting needed

    var ie4=document.al l
    var ns6=document.ge tElementById&&! document.all

    if (ie4||ns6)
    document.write( '<div id="dropmenudiv " style="visibili ty:hidden;width :'+menuwidth+'; background-color:'+menubgc olor+'" onMouseover="cl earhidemenu()" onMouseout="dyn amichide(event) "></div>')

    function getposOffset(wh at, offsett[/code]
    Last edited by gits; Sep 7 '07, 07:19 AM. Reason: added code tags
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    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

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      Changed the thread title. Please use a good thread title.

      Comment

      Working...