<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ABCoder &#187; IE</title>
	<atom:link href="http://abcoder.com/topics/browser/ie/feed/" rel="self" type="application/rss+xml" />
	<link>http://abcoder.com</link>
	<description>ABCoder - Coding is Simple as A b c</description>
	<lastBuildDate>Sat, 17 Jul 2010 11:45:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>IE6 fix for select box over absolute positioned element</title>
		<link>http://abcoder.com/javascript/ie6-fix-for-select-box-over-absolute-positioned-element/</link>
		<comments>http://abcoder.com/javascript/ie6-fix-for-select-box-over-absolute-positioned-element/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 11:07:36 +0000</pubDate>
		<dc:creator>adnan</dc:creator>
				<category><![CDATA[Browser]]></category>
		<category><![CDATA[Core JavaScript]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[absolute]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[drop down menu]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[internet explorer 6]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[ul]]></category>
		<category><![CDATA[windowed element]]></category>

		<guid isPermaLink="false">http://abcoder.com/?p=129</guid>
		<description><![CDATA[The detailed instruction with css and jquery code for drop down menu over select box - fix for ie6.


Related posts:<ol><li><a href='http://abcoder.com/javascript/jquery/jquery-drop-down-menu-without-settimeout/' rel='bookmark' title='Permanent Link: jQuery Drop down menu without setTimeout'>jQuery Drop down menu without setTimeout</a> <small>jQuery drop down menu without using setTimeout function of javascript. It uses the magic of jQuery's hover function. The magical thing happens when the hover function is called inside another hover function with first function to null. So the menu doesn't hide and so no need to use the setTimeout. It's a very smart solution in the "jQuery way"!...</small></li>
<li><a href='http://abcoder.com/javascript/a-better-process-to-find-maximum-z-index-within-a-page/' rel='bookmark' title='Permanent Link: A better process to find maximum z-index within a page'>A better process to find maximum z-index within a page</a> <small>A jQuery approach to find the maximum z-index of an element in DOM. You'll find it helpful and handy for your complex javascript application when you need to handle the absolute positioned message windows layers or similar cases....</small></li>
<li><a href='http://abcoder.com/css/css-equal-height-columns/' rel='bookmark' title='Permanent Link: CSS Equal Height Columns'>CSS Equal Height Columns</a> <small>Pure CSS three columns equal height hack with and without background image, bottom border fix and many more. Please go through the full article for different phenomena of div based multi-columns layout with free html, jQuery, javascript, css source code and images....</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>IE6 sux. General css/javascript hover drop-down menu uses a div or ul with position:absolute. No matter how much you increase the value of z-index the select box (windowed element) will always remain on top most &#8211; yes only on a special browser, Internet Explorer 6. The reason is IE6 considers select element as windowed element and keeps it always on top layer. </p>
<p><img src="http://abcoder.com/images/select-box-over-div-ie6.jpg" alt="IE6 select box over div " /></p>
<p>Solution is using iframe on top of select element, as iframe is also a windowed element placing it on top of select box fix the problem.</p>
<p><img src="http://abcoder.com/images/select-box-over-div-ie6-fixed.jpg" alt="IE6 select box over div prob fixed using iframe" /></p>
<p>Here is the typical HTML code for this drop-down menu:</p>
<pre class="brush: xml;">&lt;div class=&quot;top-menus&quot; style=&quot;left: 221px; top: 127px;&quot;&gt;
&lt;iframe frameborder=&quot;0&quot; scrolling=&quot;no&quot; align=&quot;bottom&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; src=&quot;javascript:'';&quot; style=&quot;height: 200px;&quot;&gt;&lt;/iframe&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Bracelets&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Rings&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Earrings&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Necklaces&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;</pre>
<p>The inline css is calculated using jQuery offset() function. FYI, you can easily get the width,height,left,top position of any element using jQuery(&#8220;element&#8221;).offset(). Make sure the width and height of the iframe is exactly same of it&#8217;s overlying UL element. If you apply any border to the UL, you have to consider that during calculating the proper width/height of the iframe.</p>
<p>This is the sample jQuery code:</p>
<pre class="brush: jscript;">var timer = null; // global
$(&quot;#top-nav a&quot;).hover(function(){
	clearTimeout(timer);
	$(&quot;#top-nav a:not('.cur')&quot;).removeClass(&quot;selected&quot;);
	$(this).addClass(&quot;selected&quot;);

	var o = $(this).offset();
	var left = o.left + 1; // 1px extra for border
	var top = o.top + 32; // 32px for placing it just below the horizontal menu
	if($(&quot;.top-menus&quot;).length){
		if(left == $(&quot;.top-menus&quot;).offset().left)
			return;
		else $(&quot;.top-menus&quot;).remove();
	}

	$(&quot;body&quot;).prepend('&lt;div style=&quot;left:'+left+'px;top:'+top+'px;&quot; class=&quot;top-menus&quot;&gt;&lt;iframe src=&quot;javascript:\'\';&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; align=&quot;bottom&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;&lt;ul&gt;'+html+'&lt;/ul&gt;&lt;/div&gt;');
		$(&quot;.top-menus&quot;).find(&quot;.parent, .child&quot;).remove();
		var hi = $(&quot;.top-menus&quot;).find(&quot;ul&quot;).height();
		$(&quot;iframe&quot;).height(hi + 2); // extra 2px for border

}, function(){
	clearTimeout(timer);
	timer = setTimeout(function(){$(&quot;body&quot;).find(&quot;iframe,.top-menus&quot;).remove(); $(&quot;#top-nav a:not('.cur')&quot;).removeClass(&quot;selected&quot;);},300);
});

$(&quot;.top-menus&quot;).live(&quot;mouseover&quot;,function(){
	clearTimeout(timer);
}).live(&quot;mouseout&quot;,function(){
	clearTimeout(timer);
	timer = setTimeout(function(){$(&quot;body&quot;).find(&quot;iframe,.top-menus&quot;).remove(); $(&quot;#top-nav a:not('.cur')&quot;).removeClass(&quot;selected&quot;);},300);
});</pre>
<p>I know this code won&#8217;t exactly fulfill your requirement, you can get the main idea from this and write your own code yourself. You can see it in action on <a href="http://www.trendtogo.com/">www.trendtogo.com</a>.</p>


<p>Related posts:</p><ol><li><a href='http://abcoder.com/javascript/jquery/jquery-drop-down-menu-without-settimeout/' rel='bookmark' title='Permanent Link: jQuery Drop down menu without setTimeout'>jQuery Drop down menu without setTimeout</a> <small>jQuery drop down menu without using setTimeout function of javascript. It uses the magic of jQuery's hover function. The magical thing happens when the hover function is called inside another hover function with first function to null. So the menu doesn't hide and so no need to use the setTimeout. It's a very smart solution in the "jQuery way"!...</small></li>
<li><a href='http://abcoder.com/javascript/a-better-process-to-find-maximum-z-index-within-a-page/' rel='bookmark' title='Permanent Link: A better process to find maximum z-index within a page'>A better process to find maximum z-index within a page</a> <small>A jQuery approach to find the maximum z-index of an element in DOM. You'll find it helpful and handy for your complex javascript application when you need to handle the absolute positioned message windows layers or similar cases....</small></li>
<li><a href='http://abcoder.com/css/css-equal-height-columns/' rel='bookmark' title='Permanent Link: CSS Equal Height Columns'>CSS Equal Height Columns</a> <small>Pure CSS three columns equal height hack with and without background image, bottom border fix and many more. Please go through the full article for different phenomena of div based multi-columns layout with free html, jQuery, javascript, css source code and images....</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://abcoder.com/javascript/ie6-fix-for-select-box-over-absolute-positioned-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
