<?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>iPUNKID &#187; clearfix</title>
	<atom:link href="http://blog.punkid.org/tag/clearfix/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.punkid.org</link>
	<description>To ∞ and Beyond</description>
	<lastBuildDate>Sun, 29 Jan 2012 13:02:09 +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>Bugs on Modern Browsers</title>
		<link>http://blog.punkid.org/2007/03/17/bugs-on-modern-browsers/</link>
		<comments>http://blog.punkid.org/2007/03/17/bugs-on-modern-browsers/#comments</comments>
		<pubDate>Sat, 17 Mar 2007 13:04:32 +0000</pubDate>
		<dc:creator>iPUNKID</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[clearfix]]></category>
		<category><![CDATA[fixed-position]]></category>
		<category><![CDATA[Gecko]]></category>
		<category><![CDATA[Konqueor]]></category>

		<guid isPermaLink="false">http://blog.punkid.org/2007/03/17/bugs-on-modern-browsers/</guid>
		<description><![CDATA[While I&#8217;m making a new wordpress design for Rockaby, I found Mozilla Firefox and even Konqueror Browser have some problems or misunderstanding on CSS compliance. Fixed Position Fucked Up When Scrolling in Gecko Engine Browsers I like the idea of keeping the footer area always visible on the bottom of the browser window, so i [...]]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;m making a new wordpress design for <a href="http://rockaby.net" title="Rockaby">Rockaby</a>, I found Mozilla Firefox and even Konqueror Browser have some problems or misunderstanding on CSS compliance.</p>
<h3>Fixed Position Fucked Up When Scrolling in Gecko Engine Browsers</h3>
<p>I like the idea of keeping the footer area always visible on the bottom of the browser window, so i did it to the Rockaby&#8217;s theme, I applied <code>fixed</code> position rule into the footer div like this.</p>
<pre>
#footer  {height:104px;width:100%;color:#fff;font-size:1.3em;background:url(img/footer.png) repeat-x ;position:fixed;bottom:0;z-index:8;}
</pre>
<p>The footer should always stand on the bottom of the browser window in spite of scrolling. I knew IE6 couldnt understand <code>fixed</code> position rule. I&#8217;ve tested it in IE7,Konqueror,Opera&#8230;all work well,except Firefox. When the page loads much information and objects, scrolling quickly may fuck up the whole page, lets see the 2 pictures below .<br />
<span id="more-33"></span><br />
<img src="http://photo1.yupoo.com/20070317/183403_403463253_xocliikv.jpg" alt="Mozilla Bug" width="420" height="301" border="0" /></p>
<p>It looks quite well as the footer standing on the bottom of the visible area in Firefox browser window.</p>
<p><img src="http://photo1.yupoo.com/20070317/183405_1924525188_qgkriivm.jpg" alt="Mozilla Bug" width="420" height="301" border="0" /></p>
<p>Then I just scroll the window, ooh, it really fucked up. And it wont be okay unless I minimize it or switch to another tab. The browser takes too much time to render the fixed object. I&#8217;ve tried it in FF1.5 and FF2.0, Flock, SeaMonkey and K-Meleon (all in Gecko Engine), no luck.</p>
<p>This is a bug in Gecko Engine Browser, and no solution <abbr title="As Far As I Know">AFAIK</abbr>. All you can do is make sure that the page doesnt load a LOT of objects or give up the fixed position idea. Fortunately, the Mozilla developers have noticed this problem,I tried the latest nightly build of Firefox 3 (a3pre),it works much better (though still far from perfect).</p>
<p>Anyway, I dont feel like to give up the fixed position idea so far.</p>
<h3>Clearfix doesnt works well in :after pseudo element in Konqueror (KHTML)</h3>
<p>The well-known clearfix CSS tip is used to close the floating objects. I added this rule to make drop cap typographical effects for the first letter in each blog entry.</p>
<pre>.entry > p:first-child:first-letter { font: 30px Times,Georgia,Verdana,'Lucida Grande',Sans-Serif; text-transform: uppercase; float: left; margin-right: 8px; padding-top: 4px }
</pre>
<p>To close the floating, and make sure the floating paragraph wont mess up the others. I applied this clearfix rule into the first paragraph&#8217;s <code>:after</code> pseudo</p>
<pre>
.entry > p:first-child:after {content:".";display:block;height:0;clear:both;visibility:hidden;text-indent:-9999em;}
</pre>
<p>It works well in Firefox and Opera, but Konqueror maybe misunderstand it. See the image below, the content of the <code>:after</code> pesudo element is visible!</p>
<p><img src="http://photo1.yupoo.com/20070317/192044_1738624070_rcmbbmvx.jpg" alt="clearfix-bug" width="420" height="224" border="0" /></p>
<p>Thanx to Thomas&#8217;s <a href="http://thomas.tanreisoftware.com/?p=11" title="CSS hacks series">CSS hacks series</a> and the other browsers&#8217; bad CSS3 compliance. We&#8217;ll be able to &#8216;fix&#8217; it by a pure CSS3 way.</p>
<pre>
html:not(:nth-child(1)) ... { ... }
</pre>
<p>This rule is only recognized by Konqueror,thx to its fantastic support on CSS3 selectors. So i applied this rule:</p>
<pre>
html:not(:nth-child(1)) .entry > p:first-child:after {content:""}
</pre>
<p>To give a null content to the <code>:after</code> pseudo element. And please notice, actually the content is still there, but becuz its null, so nothing we can see.</p>
<p>And definitely you can use this hack to apply specific rules on Konqueror at hand (before other browsers give support on <code>:not</code> and <code>:nth-child</code> pseudo)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.punkid.org/2007/03/17/bugs-on-modern-browsers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

