<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CSS drop-down menus: how to keep the top level selected when hovering over a sub-menu</title>
	<atom:link href="http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/</link>
	<description>- web design and life stuff</description>
	<lastBuildDate>Tue, 09 Mar 2010 03:12:01 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Hi</title>
		<link>http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-818</link>
		<dc:creator>Hi</dc:creator>
		<pubDate>Tue, 09 Mar 2010 03:12:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.forma3.com/v4/journal/drop-down-menus-persistent-top-level-menu-styling/#comment-818</guid>
		<description>I created a site with dropdown menus.......on the top and when i view in morzilla firefox.....it works perfectly fine and it stay on the top but when i view the same thing on internet explore the menus are on the right side and drop down are on the left side ...............

help</description>
		<content:encoded><![CDATA[<p>I created a site with dropdown menus&#8230;&#8230;.on the top and when i view in morzilla firefox&#8230;..it works perfectly fine and it stay on the top but when i view the same thing on internet explore the menus are on the right side and drop down are on the left side &#8230;&#8230;&#8230;&#8230;&#8230;</p>
<p>help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JJ</title>
		<link>http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-814</link>
		<dc:creator>JJ</dc:creator>
		<pubDate>Tue, 02 Feb 2010 09:42:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.forma3.com/v4/journal/drop-down-menus-persistent-top-level-menu-styling/#comment-814</guid>
		<description>Hi

As above I&#039;m having two issues:

1. In all browsers, the first list item always takes its hover state no matter which item in the list you hover over.

2. I&#039;m gettiing a nasty flicker in IE6 which won&#039;t seem to go away, even with the solution highlighted above.

Anyone have a solution?</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>As above I&#8217;m having two issues:</p>
<p>1. In all browsers, the first list item always takes its hover state no matter which item in the list you hover over.</p>
<p>2. I&#8217;m gettiing a nasty flicker in IE6 which won&#8217;t seem to go away, even with the solution highlighted above.</p>
<p>Anyone have a solution?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ganybhat</title>
		<link>http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-813</link>
		<dc:creator>Ganybhat</dc:creator>
		<pubDate>Fri, 15 Jan 2010 10:06:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.forma3.com/v4/journal/drop-down-menus-persistent-top-level-menu-styling/#comment-813</guid>
		<description>In my case i have added image for a and a:hover. Menu is smoothly running in all browser except ie6!
In ie6 menu is flickering by hover. Is there any solution for this?</description>
		<content:encoded><![CDATA[<p>In my case i have added image for a and a:hover. Menu is smoothly running in all browser except ie6!<br />
In ie6 menu is flickering by hover. Is there any solution for this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-810</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Thu, 03 Dec 2009 16:07:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.forma3.com/v4/journal/drop-down-menus-persistent-top-level-menu-styling/#comment-810</guid>
		<description>I&#039;m having an issue with the first menu item the same issue as John. Was there a solution for this?</description>
		<content:encoded><![CDATA[<p>I&#8217;m having an issue with the first menu item the same issue as John. Was there a solution for this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-688</link>
		<dc:creator>John</dc:creator>
		<pubDate>Fri, 11 Sep 2009 16:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.forma3.com/v4/journal/drop-down-menus-persistent-top-level-menu-styling/#comment-688</guid>
		<description>Darren,

I&#039;m a bit new to css/design, and I am attempting to implement your solution here, but I&#039;ve run into a problem that I can&#039;t seem to fix.  I have my menu set up, with a div containing the entire menu and submenu, and everything is labeled from that, as opposed to how you have your main  labeled with an id.  Everything I have looks fine like I want it except for some reason the very first  of the main menu stays highlighted no matter which other list item I am on.  However, all of the other list items in the main menu work as they should, only becoming highlighted when I am hovering over them or in their submenu.  Any ideas?... I can send you my styling and html in a txt file if you think that would help.</description>
		<content:encoded><![CDATA[<p>Darren,</p>
<p>I&#8217;m a bit new to css/design, and I am attempting to implement your solution here, but I&#8217;ve run into a problem that I can&#8217;t seem to fix.  I have my menu set up, with a div containing the entire menu and submenu, and everything is labeled from that, as opposed to how you have your main  labeled with an id.  Everything I have looks fine like I want it except for some reason the very first  of the main menu stays highlighted no matter which other list item I am on.  However, all of the other list items in the main menu work as they should, only becoming highlighted when I am hovering over them or in their submenu.  Any ideas?&#8230; I can send you my styling and html in a txt file if you think that would help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren</title>
		<link>http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-667</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Mon, 27 Jul 2009 18:25:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.forma3.com/v4/journal/drop-down-menus-persistent-top-level-menu-styling/#comment-667</guid>
		<description>Great, thanks for the comment and, particularly, sharing your solution!</description>
		<content:encoded><![CDATA[<p>Great, thanks for the comment and, particularly, sharing your solution!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Demetri</title>
		<link>http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-666</link>
		<dc:creator>Demetri</dc:creator>
		<pubDate>Mon, 27 Jul 2009 18:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.forma3.com/v4/journal/drop-down-menus-persistent-top-level-menu-styling/#comment-666</guid>
		<description>Darren,

You&#039;re right, it does pull the cached version of the page when I hit back. I&#039;ve tried your code, but I still get the same result. The problem seems to be that the page doesn&#039;t actually execute any of the javascript on the page (whether it be from an included .js file or within script tags in the page&#039;s code) when it displays this cached page.

... as I was writing this, I thought of adding the function call to menuHover() when the page unloads, so it would be forced to &#039;deactivate&#039; the active classes. This apparently worked.

For those who are interested, I just added this to my body tag:
onunload=&quot;javascript: menuHover();&quot;

Along with adding the code Darren provided above, to the menuHover() function.</description>
		<content:encoded><![CDATA[<p>Darren,</p>
<p>You&#8217;re right, it does pull the cached version of the page when I hit back. I&#8217;ve tried your code, but I still get the same result. The problem seems to be that the page doesn&#8217;t actually execute any of the javascript on the page (whether it be from an included .js file or within script tags in the page&#8217;s code) when it displays this cached page.</p>
<p>&#8230; as I was writing this, I thought of adding the function call to menuHover() when the page unloads, so it would be forced to &#8216;deactivate&#8217; the active classes. This apparently worked.</p>
<p>For those who are interested, I just added this to my body tag:<br />
onunload=&#8221;javascript: menuHover();&#8221;</p>
<p>Along with adding the code Darren provided above, to the menuHover() function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren</title>
		<link>http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-665</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Mon, 27 Jul 2009 01:20:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.forma3.com/v4/journal/drop-down-menus-persistent-top-level-menu-styling/#comment-665</guid>
		<description>Hello everyone,

Sorry about taking so long to reply, been rather swamped with work of late!

&lt;a href=&quot;http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-637&quot; rel=&quot;nofollow&quot;&gt;@DeviousMrBlonde&lt;/a&gt;: Are you looking at the menu in IE6/7? If so, I imagine you&#039;d have to add more code to activate the menu in the lower LI tags, similar to what is done for the top-level elements.

&lt;a href=&quot;http://bonestructure.com/&quot; rel=&quot;nofollow&quot;&gt;@dbone&lt;/a&gt;: I&#039;m not sure exactly how to address the problem you&#039;re seeing in IE7. It could be that the overstate is not being removed when moving the mouse quickly to another top-level element. Perhaps adding some spacing in the CSS between the menu elements? This way the mouse cursor would be over an inactive area, perhaps giving IE7 enough time to remove the hover state.

&lt;a href=&quot;http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-660&quot; rel=&quot;nofollow&quot;&gt;@banks&lt;/a&gt;: Have a link I can take a look at?

&lt;a href=&quot;http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-661&quot; rel=&quot;nofollow&quot;&gt;@Demetri&lt;/a&gt;: My guess is Firefox is pulling a cached version of the page, which would include the &quot;active&quot; class name. I possible solution would be to clear all &quot;active&quot; class names on page load.

The Javascript would look something like this (note, I haven&#039;t tested this, so it may not work):

&lt;pre&gt;&lt;code&gt;var listItem = document.getElementById(nav).getElementsByTagName(&#039;ul&#039;);
for(var i=0;i&lt;listItem.length;i++) {
    var changeStyle = listItem[i].parentNode.getElementsByTagName(&#039;a&#039;);
    changeStyle[0].className=listItem[i].className.replace(new RegExp(&quot;\\s?active\\b&quot;), &quot;&quot;);
}&lt;/pre&gt;&lt;/code&gt;

You&#039;d put this somewhere in the &quot;menuHover()&quot; function. Let me know if this does or doesn&#039;t work!</description>
		<content:encoded><![CDATA[<p>Hello everyone,</p>
<p>Sorry about taking so long to reply, been rather swamped with work of late!</p>
<p><a href="http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-637" rel="nofollow">@DeviousMrBlonde</a>: Are you looking at the menu in IE6/7? If so, I imagine you&#8217;d have to add more code to activate the menu in the lower LI tags, similar to what is done for the top-level elements.</p>
<p><a href="http://bonestructure.com/" rel="nofollow">@dbone</a>: I&#8217;m not sure exactly how to address the problem you&#8217;re seeing in IE7. It could be that the overstate is not being removed when moving the mouse quickly to another top-level element. Perhaps adding some spacing in the CSS between the menu elements? This way the mouse cursor would be over an inactive area, perhaps giving IE7 enough time to remove the hover state.</p>
<p><a href="http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-660" rel="nofollow">@banks</a>: Have a link I can take a look at?</p>
<p><a href="http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-661" rel="nofollow">@Demetri</a>: My guess is Firefox is pulling a cached version of the page, which would include the &#8220;active&#8221; class name. I possible solution would be to clear all &#8220;active&#8221; class names on page load.</p>
<p>The Javascript would look something like this (note, I haven&#8217;t tested this, so it may not work):</p>
<pre><code>var listItem = document.getElementById(nav).getElementsByTagName('ul');
for(var i=0;i&lt;listItem.length;i++) {
    var changeStyle = listItem[i].parentNode.getElementsByTagName('a');
    changeStyle[0].className=listItem[i].className.replace(new RegExp("\\s?active\\b"), "");
}</code></pre>
<p>You'd put this somewhere in the "menuHover()" function. Let me know if this does or doesn't work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Demetri</title>
		<link>http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-662</link>
		<dc:creator>Demetri</dc:creator>
		<pubDate>Thu, 09 Jul 2009 15:45:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.forma3.com/v4/journal/drop-down-menus-persistent-top-level-menu-styling/#comment-662</guid>
		<description>I have a slight correction to my above comment/question. The issue seems to be only happening in Firefox. IE and Chrome both work fine as of right now.</description>
		<content:encoded><![CDATA[<p>I have a slight correction to my above comment/question. The issue seems to be only happening in Firefox. IE and Chrome both work fine as of right now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Demetri</title>
		<link>http://www.darrenkrape.com/categories/design-and-development/drop-down-menus-persistent-top-level-menu-styling/comment-page-1/#comment-661</link>
		<dc:creator>Demetri</dc:creator>
		<pubDate>Thu, 09 Jul 2009 15:42:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.forma3.com/v4/journal/drop-down-menus-persistent-top-level-menu-styling/#comment-661</guid>
		<description>Hi, this is exactly what I was looking for, but I have one issue that seems to be happening on all browsers I&#039;ve tested. If I click on one of the drop-down links and go to that page; when I hit &#039;back&#039; in my browser, it goes back to the page I came from, but the drop-down is stuck as if I had my mouse over it. Nothing seems to disable the mouse-over affect unless I refresh the page.

Is there something I can put at the top of my html code that will force the javascript to clear any menuhover() function calls? I tried to do something like this already, but had no luck.

Any help would be great since I&#039;ve already employed this menu structure into my project and would love to continue using it without a great deal of backtracking. Thanks!</description>
		<content:encoded><![CDATA[<p>Hi, this is exactly what I was looking for, but I have one issue that seems to be happening on all browsers I&#8217;ve tested. If I click on one of the drop-down links and go to that page; when I hit &#8216;back&#8217; in my browser, it goes back to the page I came from, but the drop-down is stuck as if I had my mouse over it. Nothing seems to disable the mouse-over affect unless I refresh the page.</p>
<p>Is there something I can put at the top of my html code that will force the javascript to clear any menuhover() function calls? I tried to do something like this already, but had no luck.</p>
<p>Any help would be great since I&#8217;ve already employed this menu structure into my project and would love to continue using it without a great deal of backtracking. Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
