We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24230
    • 5 Posts
    Scotty

    thanks for this great & simple tutorial

    Nevertheless I could not managed to make it work 100% fine, since, in your example, the Contact and FAQ are not showing off when a root item is selected and its children viewed.

    Any clue please?
      • 15159
      • 93 Posts
      @Quivvy

      Can we see a link to your css? smiley I know that scotty’s tutorial over the last couple days has helped me finally get a grasp on making drop menu do what I want. And it has done more than make dropmenu prettier for me. Now I can do things like make a sitemap etc.

      BTW, Scotty thanks. I really owe you one on this
        • 24230
        • 5 Posts
        here is the css mess I produced, mixing several sources...




        body{
        font: normal 11px/22px Verdana, Arial, Helvetica, sans-serif;
        background-image: url("images/bg.gif");
        color: #333;
        padding: 0;
        margin: 0;
        }
        a{
        color: #666;
        text-decoration: none;
        }
        a:hover{
        text-decoration: underline;
        }

        h3{
        color: #333;
        text-indent: 10px;
        }
        h1{
        margin: 0;
        padding: 0;
        color: #fff;
        text-indent: 1em;
        background-color: #cdd3d3;
        font-size: 12px;
        }
        #container{
        margin: 5px;
        text-align: left;
        width: 1000px;
        background-color: #fcfcfc;
        border: 1px dashed #cdd3d3;
        }

        #menu{
        float: left;
        width: 180px;
        height: 400px;

        }

        #menu ul{
        list-style-type: none;
        float: left;
        width: 180px;
        background-color: #DCDCDC;
        color: #ffffff;

        }

        #menu li {
        list-style:none;
        color:#FFFFFF;
        }

        #menu a{
        list-style:none;
        color: #FFFFFF;
        }


        /* couleur et style pour le niveau racine et actif -----------------------------------------------*/
        #menu li.here, #menu li.here a {
        color: #FFFFFF;

        }

        /* effacer les dossiers de niveau 2 */
        #menu ul ul {
        display: none;
        }

        /* montrer les items de niveau 2 quand vous y êtes*/
        #menu li.here ul {
        display: block;
        margin:0 0 0 0px;
        }

        /* couleur et style pour le niveau 2 actif ----------------------------------------------*/
        #menu li.here ul li a {/* Entrée de deuxième niveau non sélectionnée */
        color:#FFFFFF;
        }
        #menu li.here li.here a { /* Entrée sélectionnée de deuxième niveau */
        color:#f90;
        }

        #menu h1{
        background-color: #59708c;
        width: 220px;

        }

        h4{

        color: #5F9EA0;
        font-size: 10px;
        text-align: right;
        }



        #content{
        float: right;
        width: 750px;

        margin: 0 0 0 -1;
        padding: 0px 20px 30px 20px;
        border-left: 1px dashed #cdd3d3;
        background: #fcfcfc;
        }
        #footer{
        clear: both;
        margin: 0;
        padding: 1px 0;
        background: #f3f3f3;
        text-align: right;
        color: #59708c;
        font-weight: bold;
        font-size: 0.8em;
        }



        As for the template itself, there is only a div called menu placed on the left with the [[DropMenu]] snippet in it.

        Thanks in advance for any help.
          • 15159
          • 93 Posts
          The easiest way to debug this is look at the xhtml that drop menu is putting out on your site. You can see the nested <li> and <ul> tags. Then create a here class for the level you are trying to effect i.e. menu ul li li and the display action you want.
            • 26435
            • 1,193 Posts
            ScottyDelicious Reply #25, 18 years ago
            Quote from: jwtyler at May 17, 2006, 03:31 PM

            The easiest way to debug this is look at the xhtml that drop menu is putting out on your site. You can see the nested <li> and <ul> tags. Then create a here class for the level you are trying to effect i.e. menu ul li li and the display action you want.
            And the easiest way to look at the tags that are in the XHTML is to use FireFox with the Web Developer Extension. Once the extension is installed, choose "Outline --> Outline Current Element..." and hover over the item you want to style with CSS. on the bottom bar of the browser window, you will see a path from the top level of the html document to the current ID or Class, listing it’s exact CSS path for you. all you have to do is make an entry in your CSS for that particular item.

            For example, on my own website, http://www.scottydelicious.com/ if you were to outline current element and hover over the link in my menu area that says "home", you would see along the bottom

            html> body#scottydelicious > div #container > div #sidebar > div #pages > div #pagec > ul.topnav > li.here


            so, to style this item, I could use all those tags, or, since I know it is the only drop menu in the #pagec div, I can use

            #pagec ul.topnav li.here {
               color:#ff9900;
               padding:0;
               margin:0;
            }


            So you can see how easy the Web Developer plugin makes styling drop menu, because it tells you exactly what you need to style!

            -sD-
              Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
              All of the above... in no specific order.


              I send pointless little messages
              • 15159
              • 93 Posts
              Scotty! That is a brilliant tip. Thanks so much.
                • 7648
                • 2 Posts
                Thanks for all the tips. I downloaded a dreamweaver extension which creates and styles list for me and it works great. The only problem I’m having now is that the styles isn’t applied on whatever page I’m currently browsing (the current page)

                You can look at the website I’m making here www.artsenrealty.com/modx
                Artsen Realty is a site i build a long time ago using the OLD method of building websites (what a pain).

                So i would really appreciate any help i can get from anybody. Thanks smiley
                  • 6850
                  • 12 Posts
                  I’ve been trying to do some tricks on my menu using this tutorial. Basically what I want to do is only show the parent and child documents of a given document. I got it to work until I enabled "selfAsLink". When you enable "selfAsLink" the "here" class for the parent document disappears, only showing here for the current document. So the parent document and all the children made visible with the first "li.here" vanish. Is this a bug?
                    • 7923
                    • 4,213 Posts
                    Quote from: ddmobley at Jun 13, 2006, 10:15 PM

                    I’ve been trying to do some tricks on my menu using this tutorial. Basically what I want to do is only show the parent and child documents of a given document. I got it to work until I enabled "selfAsLink". When you enable "selfAsLink" the "here" class for the parent document disappears, only showing here for the current document. So the parent document and all the children made visible with the first "li.here" vanish. Is this a bug?

                    Maybe this helps: [URL=http://modxcms.com/forums/index.php/topic,1916.msg36485.html#msg36485]Re: DropMenu. if SelfAsLink = false[URL]


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 6850
                      • 12 Posts
                      That doesn’t address my issue. I want the "selfAsLink" enabled and I want the "here" class for the parent document to be present as well as the "here" class for the current document, like it does if "selfAsLink" was false. The "here" class for the parent document is present if "selfAsLink" is false, but not if "selfAsLink" is true. It shouldn’t vanish just because the parent document list element is a link or not.

                      Also, if "selfAsLink" is set to false, then when you are on the parent document, that document name in the menu is just text, not a link (obviously). If you click on a child document below the parent, THAT document name IS a link in the menu as is the parent document. Why would DropMenu discriminate between creating links or not based on whether that document is a parent or child? If "selfAsLink" is false, then the current document SHOULD NOT be a link regardless of where it was a parent or a child.

                      Is this a bug? (or 2 bugs?)