Results 1 to 3 of 3

Thread: Help with difficult combination, please

  1. #1
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with difficult combination, please

    I feel like I am being a dunce right now. I am trying to combine the DD CSS Suckertree vertical menu with the glossy menu, to get a pretty cool effect but all I am getting is partial glossy menus top and sub levels. What the heck am I doing wrong?

    TIA, Paul

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    A link or some code would help. It's kind of hard to know without that.

  3. #3
    Join Date
    Jun 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    OK, sorry, so I have both css menu styles posted in a test html page trying to get it right. I have started integrating the 2 so here is what I have.... Iam trying to move the glossymenu to the suckerdiv. Thanks for any help.

    <html>
    <head>
    <title>Your Company Name</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" href="css/styles.css" type="text/css">
    <style type="text/css" media="screen, projection">




    /*Credits: Dynamic Drive CSS Library */
    /*URL: http://www.dynamicdrive.com/style/ */

    .glossymenu{
    list-style-type: none;
    margin: 5px 0;
    padding: 0;
    width: 162px;
    border: 1px solid #9A9A9A;
    border-bottom-width: 0;
    }

    .glossymenu li a{
    background: white url(images/glossyback.gif) repeat-x bottom left;
    font: bold 13px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif;
    color: white;
    display: block;
    width: auto;
    padding: 3px 0;
    padding-left: 10px;
    text-decoration: none;

    }


    * html .glossymenu li a{ /*IE only. Actual menu width minus left padding of A element (10px) */
    width: 160px;
    }

    .glossymenu li a:visited, .glossymenu li a:active{
    color: white;
    }

    .glossymenu li a:hover{
    background-image: url(images/glossyback2.gif);
    }



    /*Credits: Dynamic Drive CSS Library */
    /*URL: http://www.dynamicdrive.com/style/ */

    .suckerdiv ul{
    list-style-type: none;
    margin: 5px 0;
    padding: 0;
    width: 162px;
    border: 1px solid #9A9A9A;
    border-bottom-width: 0;
    }

    .suckerdiv ul li{
    position: relative;
    background: white url(images/glossyback.gif) repeat-x bottom left;
    font: bold 13px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif;
    color: white;
    display: block;
    width: auto;
    padding: 3px 0;
    padding-left: 10px;
    text-decoration: none;

    }

    /*Sub level menu items */
    .suckerdiv ul li ul{
    position: absolute;
    width: 162px; /*sub menu width*/
    top: 0;
    visibility: hidden;
    list-style-type: none;
    margin: 5px 0;
    padding: 0;
    width: 162px;
    border: 1px solid #9A9A9A;
    border-bottom-width: 0;
    }

    /* Sub level menu links style */
    .suckerdiv ul li a{
    display: block;
    overflow: auto; /*force hasLayout in IE7 */
    color: black;
    text-decoration: none;
    background: #fff;
    padding: 1px 5px;
    border: 1px solid #ccc;
    border-bottom: 0;
    }

    .suckerdiv ul li a:visited{
    color: white;
    }

    .suckerdiv ul li a:hover{
    background-image: url(images/glossyback2.gif);
    }

    .suckerdiv .subfolderstyle{
    background: url(images/arrow-list.gif) no-repeat center right;
    }


    /* Holly Hack for IE \*/
    * html .suckerdiv li a{ /*IE only. Actual menu width minus left padding of A element (10px) */
    width: 162px;
    * html .suckerdiv ul li { float: left; height: 1%; }
    * html .suckerdiv ul li a { height: 1%; }
    /* End */

    </style>

    <script type="text/javascript">

    //SuckerTree Vertical Menu 1.1 (Nov 8th, 06)
    //By Dynamic Drive: http://www.dynamicdrive.com/style/

    var menuids=["suckertree1"] //Enter id(s) of SuckerTree UL menus, separated by commas

    function buildsubmenus(){
    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", buildsubmenus, false)
    else if (window.attachEvent)
    window.attachEvent("onload", buildsubmenus)

    </script>


    </head>


    <div class="suckerdiv">
    <ul id="suckertree1">
    <li><a href="#">Item 1</a></li>
    <li><a href="#">Item 2</a></li>
    <li><a href="#">Folder 1</a>
    <ul>
    <li><a href="#">Sub Item 1.1</a></li>
    <li><a href="#">Sub Item 1.2</a></li>
    </ul>
    </li>
    <li><a href="#">Item 3</a></li>

    <li><a href="#">Folder 2</a>
    <ul>
    <li><a href="#">Sub Item 2.1</a></li>
    <li><a href="#">Folder 2.1</a>
    <ul>
    <li><a href="#">Sub Item 2.1.1</a></li>
    <li><a href="#">Sub Item 2.1.2</a></li>
    <li><a href="#">Sub Item 2.1.3</a></li>
    <li><a href="#">Sub Item 2.1.4</a></li>
    </ul>
    </li>
    </ul>
    </li>
    <li><a href="#">Item 4</a></li>
    </ul>
    </div>


    <div class="suckerdiv">
    <ul id="suckertree1">
    <li><a href="http://www.dynamicdrive.com/" >Dynamic Drive</a></li>
    <li><a href="http://www.dynamicdrive.com/style/" >CSS Examples</a></li>
    <li><a href="http://www.javascriptkit.com/jsref/">JavaScript Reference</a></li>
    <li><a href="http://www.javascriptkit.com/domref/">DOM Reference</a></li>
    <li><a href="http://www.cssdrive.com">CSS Drive</a></li>
    <li><a href="http://www.codingforums.com/" style="border-bottom-width: 0">Coding Forums</a>
    <ul>
    <li><a href="#">Sub Item 2.1</a></li>
    <li><a href="#">Folder 2.1</a>
    <ul>
    <li><a href="#">Sub Item 2.1.1</a></li>
    <li><a href="#">Sub Item 2.1.2</a></li>
    <li><a href="#">Sub Item 2.1.3</a></li>
    <li><a href="#">Sub Item 2.1.4</a></li>
    </ul>
    </li>
    </ul>
    </li>
    <li><a href="#">Item 4</a></li>
    </ul>
    </div>


    </body>
    </html>

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
  •