<?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>Prabeen&#039;s Blog &#187; CSS</title>
	<atom:link href="http://prabeengiri.com.np/category/css/feed" rel="self" type="application/rss+xml" />
	<link>http://prabeengiri.com.np</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 04 Jan 2011 18:31:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Fixing the Css &#8216;position:fixed&#8217; issue in IE6 using Javascript.</title>
		<link>http://prabeengiri.com.np/javascript/fixing-the-css-positionfixed-issue-in-ie-using-javascript.html</link>
		<comments>http://prabeengiri.com.np/javascript/fixing-the-css-positionfixed-issue-in-ie-using-javascript.html#comments</comments>
		<pubDate>Tue, 24 Mar 2009 12:40:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[position fixed problem]]></category>
		<category><![CDATA[position problem in IE6]]></category>
		<category><![CDATA[problem in IE6]]></category>

		<guid isPermaLink="false">http://prabeengiri.com.np/?p=42</guid>
		<description><![CDATA[Css Position Fixed issue , fixed with javascript , Problem in Internet Explorer 6]]></description>
			<content:encoded><![CDATA[<p>I had read some where that IE 7  supports the Css property &#8216;position:fixed&#8217; . But for IE 6 it can be fixed using Javascript.It was the problem I faced when I tried to make one lightBox type of pop-up  using Jquery and Ajax.<span id="more-42"></span></p>
<p>It worked fine for firefox. As we scroll the window down or up, position of the pop-up remained fixed in the pop up. But in IE it did not worked. So i tried to fix this issue in the IE6 using Javascript.</p>
<p>Here is the CSS  code for the pop-up Box.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#popUp</span>
&nbsp;
<span style="color: #00AA00;">&#123;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">fixed</span><span style="color: #00AA00;">;</span>
&nbsp;
_position<span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>
&nbsp;
............................
&nbsp;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Javascript Code.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> b_version<span style="color: #339933;">=</span>navigator.<span style="color: #660066;">appVersion</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> version<span style="color: #339933;">=</span>parseFloat<span style="color: #009900;">&#40;</span>b_version<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
window.<span style="color: #660066;">onscroll</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>browser<span style="color: #339933;">==</span><span style="color: #3366CC;">&quot;Microsoft Internet Explorer&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>version<span style="color: #339933;">&gt;=</span><span style="color: #CC0000;">6</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
             <span style="color: #003366; font-weight: bold;">var</span> top  <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span>.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">scrollTop</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
             document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'popUp'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">cssText</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;top:&quot;</span><span style="color: #339933;">+</span>top<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;px&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>When You use this javascript code. It does not makes the pop as fixed as that like by Firefox. But When the user scrolls the window. Pop up also scrolls down and gets remained in the fixed position.</p>
]]></content:encoded>
			<wfw:commentRss>http://prabeengiri.com.np/javascript/fixing-the-css-positionfixed-issue-in-ie-using-javascript.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

