Drop Down Llama Menu II

Spurred by Charles question, I went about transforming Drop Down Llama Menus from a proof of concept to a working—even IE6—drop down menus. Even though IE6 did not change since the original version, I was able to get around the biggest issues with Dean Edwards IE7 script. I should not rag on IE6 alone because I as I went through the code I noticed relic workarounds for Opera and Mozilla; these have also been removed. In the process to the barebones working version, I created a second proof of concept based on the original proof of concept with the goal of working in IE6.

The HTML and their Tags Conceptual Roles

I will start with the HTML code because it is easy—as it should be.

<ul id="navigation">
   <li><a href="/">Launch</a></li>
   <li><a href="/about/" >About</a>
      <ul><li><a href="/about/index.php#seamus">Seamus</a></li><li><a href="http://portfolio.moronicbajebus.com/">Portfolio</a></li><li class="last-child"><a href="/about/resume/">Resume</a></li></ul>
   </li>
</ul>

From the HTML code I am going to attach concepts (based upon their function) to the elements. To illustrate this I will use a tree with the tag name, a description, and the children tags.

  • ul#navigation
    • li
      The top level item container or for short the top level item.

      • a
        The top level item link.
      • ul
        The submenu container or for short the submenu. This is optional.

        • li
          The submenu item.

          • a
            The submenu link.

If you want to see what those concepts relate to the finished product, here you go:
Diagram of the concepts attached to final product
Or if you want to see where the tags will be in the finished product, here you go:
Diagram of the tags in the final product

Difference from Normal CSS Drop Down Menus

Now I am not going to explain the entire process. There are many other fine tutorials to explain CSS drop down menus. As for the specifics to Drop Down Llama Menu, the nested ul (the submenu) is not hidden outright; but the lis (submenu items) of the nested ul (submenu) is hidden.

Normally:
ul#navigation > li > ul{ display: none; }

Drop Down Llama:
ul#navigation > li > ul > li{ display: none; }

This leads into another difference. The submenu is not triggered to show (open) by hovering over the top level item. But instead the submenu items—not submenu —are triggered to show by hovering over the submenu container.

Normally:
ul#navigation > li:hover > ul{ display: block; }

Drop Down Llama:
ul#navigation > li > ul:hover > li{ display: block; }

As for the drop-down icon, that is just the background image of the submenu container (ul#navigation > li> ul). The rest is either just positioning of elements or decorative trim.

Files

  1. Original proof of concept
  2. Second proof of concept which works in IE6
  3. Barebones example with cleaned up code and documentation

Comments

    The comments to the post “Drop Down Llama Menu II.”
    Comment Said When Edit

    So, this looks sharp, and looks like it follows suckerfish pretty closely, and I realise that you posted this an ultra long time ago, but I’d be interested in finding out why exactly you took this approach. I can’t see any real benefits for either direction (suckerfish or Llama). The big difference is your hinge from what I can tell, so why do things this way? Just curious. Love the site, everythings pretty sharp looking on mac firefox 2 and Safari despite what your other readers were mentioning. I’m a fan. Anyways, good stuff!

    Said: Ken Hanson When: 4:41 pm, February 13th, 2007

    I will try my best to answer your questions Ken; but if I do miss any please tell me. I will split the question into two parts for comparing: implementation and trigger action.

    Firstly, are there “any real benefits for either direction (suckerfish or Llama)” in terms of implementation? They both have the benefit of attempting to push more of the presentation of the webpage into the CSS layer which is the presentation layer. I use Dean Edwards IE7 Script because it allows me to leave my CSS code in a cleaner state; but it adds similar CSS classes and Javascript hooks which Suckerfish implements.

    The second thing I will answer is a little harder. Which action for opening–hovering over a top level menu item or a picker–the drop down menu better? This I cannot really answer. I think time, wide use of both, and discussion may provided an answer. To be truthful, I created Llama menus as a cool experiment. I did not have any goals of usability or functionality when creating Llama menus.

    Thank you for the complement.

    Said: Seamus When: 11:07 am, February 15th, 2007

    ONLINE - DRUGSTORE!
    PRICES of ALL MEDICINES!

    FIND THAT NECESSARY…
    VIAGRA, CIALIS, PHENTERMINE, SOMA… and other pills!

    Welcome please: pills-prices.blogspot.com

    NEW INFORMATION ABOUT PAYDAY LOANS!

    Welcome please: payday-d-loans.blogspot.com

    GOOD LUCK!

    Said: steergo When: 4:49 am, November 1st, 2007

    Leave a Reply

    All comments are moderated for approval after submission. Attention spammers do not waste your or my time by trying to comment.

    Your Personal Information
    Author Name .
    Email Address .
    Website Address .
    Your Comment
    Send Your Reply