<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>Designs Advice Topic: cascading menu with premade background images</title>
<link>http://designsadvice.com/forums/</link>
<description>Designs Advice Topic: cascading menu with premade background images</description>
<language>en</language>
<pubDate>Fri, 30 Jul 2010 13:51:37 +0000</pubDate>

<item>
<title>drew on "cascading menu with premade background images"</title>
<link>http://designsadvice.com/forums/topic/cascading-menu-with-premade-background-images-3#post-204</link>
<pubDate>Fri, 25 Jan 2008 09:51:24 +0000</pubDate>
<dc:creator>drew</dc:creator>
<guid isPermaLink="false">204@http://designsadvice.com/forums/</guid>
<description>&#60;p&#62;maybe something like this will help&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;ul id=&#38;quot;nav&#38;quot;&#38;gt;
  &#38;lt;li&#38;gt;Heading
    &#38;lt;ul&#38;gt;
      &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;quot;&#38;gt;Menu1»
        drop&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
      &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;quot;&#38;gt;Option1&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
      &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;quot;&#38;gt;Option2&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
      &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;quot;&#38;gt;option3&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
		&#38;lt;/ul&#38;gt;
	&#38;lt;/li&#38;gt;

  &#38;lt;li&#38;gt;Grunts
    &#38;lt;ul&#38;gt;
      &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;quot;&#38;gt;Menu2
        &#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
      &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;quot;&#38;gt;Option1&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
      &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;quot;&#38;gt;Option2&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
    &#38;lt;/ul&#38;gt;
  &#38;lt;/li&#38;gt;

  &#38;lt;li&#38;gt;menu3
    &#38;lt;ul&#38;gt;
      &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;quot;&#38;gt;Option1&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
      &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;quot;&#38;gt;Option2&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
      &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;quot;&#38;gt;option3&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
    &#38;lt;/ul&#38;gt;
  &#38;lt;/li&#38;gt;
&#38;lt;/ul&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;strong&#62;Styling it&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;To get started, all of the lists need to be jigged around a bit — namely, the padding and margin set to zero and the list-style set to none:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;ul {
  padding: 0;
  margin: 0;
  list-style: none;
  }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Now we need to transform the first-level list into a horizontal menu bar. There are a number of methods to do this, discussed in detail elsewhere. We could display the list-items inline (display: inline), but for this example, we are going to float them to the left.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;li {
  float: left;
  position: relative;
  width: 10em;
  }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The position has been set to relative because we want the position of the second-level, nested lists to be relative to the first-level list items and the width has been set to space it out a bit. The dropdown menu is coming together.&#60;/p&#62;
&#60;p&#62;The next step is to tackle the second-level lists that will be the dropdowns themselves:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;li ul {
  display: none;
  position: absolute;
  top: 1em;
  left: 0;
  }&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This positions the second-level lists absolutely (pulling them out of the flow of HTML into a world all of their own) and sets their initial state to not be displayed. If you substitute display: none with display: block, you will see the need for the top and left properties in Internet Explorer, because without them, IE will align the second-level lists to the top right of their relative parent rather than the bottom left. Unfortunately, this IE fix will mess things up in browsers like Opera, so add the following CSS to reset the top and left properties on all but IE browsers:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;li &#38;gt; ul {
	top: auto;
	left: auto;
	}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And now, making the sucker work. To make a second-level list appear when its parent list item is “rolled over,” we simply need to add the following:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;li:hover ul, li.over ul{ display: block; }&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Which says that any list that is nested in a list item that has the cursor hovering over it should be displayed.&#60;/p&#62;
&#60;p&#62;Finally, because the lists are floated left, the content underneath it needs to be set free of the floating by applying clear: left to it.&#60;/p&#62;
&#60;p&#62;Now add this &#60;strong&#62;JavaScript&#60;/strong&#62;&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;script type=&#38;quot;text/javascript&#38;quot;&#38;gt;&#38;lt;!--
startList = function() {
if (document.all&#38;#38;&#38;#38;document.getElementById) {
navRoot = document.getElementById(&#38;quot;nav&#38;quot;);
for (i=0; i&#38;lt;navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName==&#38;quot;LI&#38;quot;) {
node.onmouseover=function() {
this.className+=&#38;quot; over&#38;quot;;
  }
  node.onmouseout=function() {
  this.className=this.className.replace(&#38;quot; over&#38;quot;, &#38;quot;&#38;quot;);
   }
   }
  }
 }
}
window.onload=startList;
-&#38;gt;&#38;lt;/script&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Heres an example: &#60;a href=&#34;http://www.htmldog.com/articles/suckerfish/bones/&#34; rel=&#34;nofollow&#34;&#62;http://www.htmldog.com/articles/suckerfish/bones/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>rockstar on "cascading menu with premade background images"</title>
<link>http://designsadvice.com/forums/topic/cascading-menu-with-premade-background-images-3#post-203</link>
<pubDate>Fri, 18 Jan 2008 14:58:35 +0000</pubDate>
<dc:creator>rockstar</dc:creator>
<guid isPermaLink="false">203@http://designsadvice.com/forums/</guid>
<description>&#60;p&#62;sorry the customers page is &#60;a href=&#34;http://www.pinktoesdesigns.com&#34;&#62;here&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>rockstar on "cascading menu with premade background images"</title>
<link>http://designsadvice.com/forums/topic/cascading-menu-with-premade-background-images-3#post-202</link>
<pubDate>Fri, 18 Jan 2008 11:06:59 +0000</pubDate>
<dc:creator>rockstar</dc:creator>
<guid isPermaLink="false">202@http://designsadvice.com/forums/</guid>
<description>&#60;p&#62;alright so now im trying to make a cascading(dropdown) menu for my &#60;a href=&#34;http://www.ptdesigns.com&#34;&#62;customers page&#60;/a&#62;&#60;br /&#62;
i basically want to take the pre-existing menu bar and add drop down menu effects to the products and designs portions&#60;/p&#62;
&#60;p&#62;i have several images already made, now i need the code to make them functional&#60;/p&#62;
&#60;p&#62;rockstar.we.bs/images/menu_02.gif&#60;br /&#62;
rockstar.we.bs/images/2menu_02.gif&#60;br /&#62;
rockstar.we.bs/images/2menu_03.gif&#60;br /&#62;
rockstar.we.bs/images/hilite1.gif&#60;br /&#62;
rockstar.we.bs/images/hilite2.gif&#60;br /&#62;
rockstar.we.bs/images/hilite3.gif&#60;br /&#62;
rockstar.we.bs/images/hilite4.gif&#60;/p&#62;
&#60;p&#62;all the code i have found so far has been for plain menus&#60;br /&#62;
and doesnt refer to how to add images for backgrounds&#60;/p&#62;
&#60;p&#62;any help would be appreciated,&#60;br /&#62;
thanks
&#60;/p&#62;</description>
</item>

</channel>
</rss>
