Advanced Search

Results 1 to 8 of 8

Thread: Help With -Nested Side Bar Menu

  1. #1
    Join Date
    May 2011
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Help With -Nested Side Bar Menu

    Hi... any help is appreciated-

    When I decrease the width of the "Nested Side Bar Menu", white space appears between it and the fly-out sub menus. Can anyone tell me how to close the gap?

    http://www.dynamicdrive.com/style/cs..._bar_menu/P20/

    I changed the width in the CSS:

    .sidebarmenu ul {
    width: 180px;

    Thanks,
    Jimmy

  2. #2
    Join Date
    May 2011
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Need sub-menus to fly-out to the left...

    Ok, I got that problem sorted out... found the submenu css.

    Could anyone tell me how I could make the submenus fly-out to the left?
    I moved my sidebar to the right side of the page.

    Is it in the javascript?
    <script type="text/javascript">

    //Nested Side Bar Menu (Mar 20th, 09)
    //By Dynamic Drive: http://www.dynamicdrive.com/style/

    var menuids=["sidebarmenu1"] //Enter id(s) of each Side Bar Menu's main UL, separated by commas

    function initsidebarmenu(){
    for (var i=0; i<menuids.length; i++){
    var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
    ultags[t].parentNode.getElementsByTagName("a")[0].className+=" subfolderstyle"
    if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
    ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
    else //else if this is a sub level submenu (ul)
    ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.display="block"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.display="none"
    }
    }
    for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
    ultags[t].style.visibility="visible"
    ultags[t].style.display="none"
    }
    }
    }

    if (window.addEventListener)
    window.addEventListener("load", initsidebarmenu, false)
    else if (window.attachEvent)
    window.attachEvent("onload", initsidebarmenu)

    </script>

  3. #3
    Join Date
    May 2011
    Location
    SFBA, CA, USA
    Posts
    94
    Thanks
    6
    Thanked 7 Times in 7 Posts

    Default

    Hi Jimmy,

    It's here:

    Code:
    ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
    else //else if this is a sub level submenu (ul)
    ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
    Just change "left" to "right".

    dbc

  4. #4
    Join Date
    May 2011
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default A little more help...

    Thanks very much for the help!

    Any idea how I can get the arrow to the left of the titles now. -submenus are now flying out to the left like I wanted, but I need the bullet in front of the text now...

    Thanks,
    Jimmy

  5. #5
    Join Date
    May 2011
    Location
    SFBA, CA, USA
    Posts
    94
    Thanks
    6
    Thanked 7 Times in 7 Posts

    Default

    It's here in your CSS:

    Code:
    .sidebarmenu a.subfolderstyle{
    background: url(right.gif) no-repeat 97% 50%;
    }
    Just change the percentage until it's where you want it. BUT, you'll need to flip the image so it's pointing the other way.


    dbc



    ------------------------------------------------------------
    If this is helpful, please don't forget to click the 'thank' button!

  6. #6
    Join Date
    May 2011
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Smile

    Great- DeathByCheese!

    That's Awesome!

    Thanks very much for all your help today!

    Jimmy

  7. #7
    Join Date
    May 2011
    Location
    SFBA, CA, USA
    Posts
    94
    Thanks
    6
    Thanked 7 Times in 7 Posts

    Default

    Your welcome Jimmy.
    This forum has been such a help to me, it's nice to be able to give back a little.

    dbc








    -----------------------------------------------------
    If this is helpful, remember to click the 'thanks' button!

  8. The Following User Says Thank You to deathbycheese For This Useful Post:

    Jimmy506 (05-07-2011)

  9. #8
    Join Date
    Aug 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wanna thank you personally, DeathByCheese! your code was very helpful to my submenu. i was finally able to move it

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
  •