Results 1 to 8 of 8

Thread: Chrome Menu - difficulties with drop down menu position

  1. #1
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Chrome Menu - difficulties with drop down menu position

    1) Script Title: Chrome Menu - difficulties with drop down menu position

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...rome/index.htm

    3) Describe problem:

    Hello, I have adjusted the chrome menu and I have tried it out,
    but the position of the drop down menu is not underneath the main button (please see example http://www.karinleitner.com/indexmagic2.htm )
    Can someone help me please? I have been trying to work it out for hours now....
    Thanks!

  2. #2
    Join Date
    Aug 2004
    Posts
    9,887
    Thanks
    3
    Thanked 963 Times in 952 Posts
    Blog Entries
    15

    Default

    Most of the positioning problems with the drop down menus can be solved by making sure the HTML for the drop down DIVs themselves is outside any container tag on the page other than the BODY. So in your case, try moving all the drop down DIVs to the bottom of your page, just above the "</body>" tag:

    Code:
    <!--1st drop down menu --> 
    <div id="dropmenu1" class="dropmenudiv" style="width:150px;">
    <a href="indexclassic.htm">Classical Music</a>
    <a href="indexmagic.htm">Magical Music</a></div>
    
    <!--2nd drop down menu --> 
    <div id="dropmenu2" class="dropmenudiv" style="width:150px;">
    <a href="Repertoire.htm">Repertoire</a>
    <a href="Castle Concerts.htm">Venues</a>
    <a href="Workshops.htm">Workshops</a>
    
    <a href="Charity.htm">Charity</a>
    <a href="Sponsors.htm">Sponsors</a>
    </div>
    
    <!--3rd drop down menu --> 
    <div id="dropmenu3" class="dropmenudiv" style="width:150px;">
    <a href="tours08.htm">2008</a>
    <a href="tours09">2009</a></div>
    
    <script type="text/javascript">
    cssdropdown.startchrome("chromemenu")
    </script>
    
    <body>
    BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice: http://www.dynamicdrive.com/notice.htm
    DD Admin

  3. #3
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello! Thank you very much! It is working now...

    And thank you for telling me about the copyright thing, I had your link in the .js file...do I have to put it into the css file aswell?

  4. #4
    Join Date
    Aug 2004
    Posts
    9,887
    Thanks
    3
    Thanked 963 Times in 952 Posts
    Blog Entries
    15

    Default

    Not the .css file, just between the SCRIPT tags as seen on the demo page's source: http://www.dynamicdrive.com/dynamici...hrome/demo.htm
    DD Admin

  5. #5
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default problem with ie6!! please check link below with ie6!

    Hello again,

    Firefox shows it no problem, but ie6 has a major problem with displaying it...here the link, but please try with ie6!

    It must be my fault, cause on the website it says that it is compatible ie5+... but where is the mistake??

    Thanks!
    Last edited by ddadmin; 09-25-2008 at 12:00 AM.

  6. #6
    Join Date
    Aug 2004
    Posts
    9,887
    Thanks
    3
    Thanked 963 Times in 952 Posts
    Blog Entries
    15

    Default

    Are we still talking about this page: http://www.karinleitner.com/indexmagic2.htm ? In IE6, I'm getting a few broken images, but the menu seems to be working fine.
    DD Admin

  7. #7
    Join Date
    Jan 2011
    Location
    Devon, England
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Postioning dropdowns in a Div Container

    Anyone get this Chrome Drop Dowm Menu system to work within a div container. The website I am revamping is within a container to center it on the page, but the menu drop downs show up offset too far below and to the right of where they should. I am trying to change the code to reference the bottom and left values of the drop down button the <li> (I think asscmenuitem) rather than the top left of the web page itself, but my javascript and understanding of DOM is weak as I haven't done it in quite some time.

    Here is the section of code in the Dropit function. if anyone could help I would be most appreciative as well as many others who want to use this menu system in a div container. I'll also include the link to all the code at the bottom.

    thanks

    Lyman

    dropit:function(obj, e, dropmenuID){
    if (this.dropmenuobj!=null) //hide previous menu
    this.hidemenu() //hide menu
    this.clearhidemenu()
    this.dropmenuobj=document.getElementById(dropmenuID) //reference drop down menu
    this.asscmenuitem=obj //reference associated menu item
    this.showmenu(this.dropmenuobj, e)
    this.dropmenuobj.x=this.getposOffset(obj, "left")
    this.dropmenuobj.y=this.getposOffset(obj, "top")
    this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
    this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
    this.positionshim() //call iframe shim function
    },


    http://www.dynamicdrive.com/dynamici...rome/index.htm
    Last edited by lymandesign; 01-13-2011 at 04:05 PM. Reason: typo

  8. #8
    Join Date
    Jun 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I too wonder if there is a way to solve usage within DIV.
    I have an old version that is working but trying to use the latest fail.
    Used at http://www.jtbworld.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •