<?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>Alexandru Dinulescu&#039;s Thoughts&#187; Webkit</title>
	<atom:link href="http://alexdweb.com/blog/tag/webkit/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexdweb.com/blog</link>
	<description>This blog is about everything/anything related to XHTML/CSS and of course my favourite js library, jQuery.</description>
	<lastBuildDate>Thu, 09 Dec 2010 12:04:10 +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>Preloading CSS Images with CSS 2.1 and CSS 3.0</title>
		<link>http://alexdweb.com/blog/2010/01/07/preloading-css-images-with-css-2-1-and-css-3-0/</link>
		<comments>http://alexdweb.com/blog/2010/01/07/preloading-css-images-with-css-2-1-and-css-3-0/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 15:36:07 +0000</pubDate>
		<dc:creator>Dinulescu Alexandru Adrian</dc:creator>
				<category><![CDATA[XHTML/CSS]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS Images]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[Webkit]]></category>

		<guid isPermaLink="false">http://alexdweb.com/blog/?p=174</guid>
		<description><![CDATA[Hello. I was trying to figure out a way to preload CSS images, by javascript or CSS. Unfortunately all the methods I found are not effective, since even tho the images are loaded, when the CSS part that contains an image which is not accessible when the site first opens, it still requires it and [...]]]></description>
			<content:encoded><![CDATA[<p> Hello. </p>
<p> I was trying to figure out a way to preload <acronym title="Cascading Style Sheets">CSS</acronym> images, by javascript or <acronym title="Cascading Style Sheets">CSS</acronym>. Unfortunately all the methods I found are not effective, since even tho the images are loaded, when the <acronym title="Cascading Style Sheets">CSS</acronym> part that contains an image which is not accessible when the site first opens, it still requires it and downloads it. I checked the net panel in firebug and it wasnt very pretty. </p>
<p> However these methods do work if you try to load images into an &lt;img&gt; tag: </p>
<p><span id="more-174"></span></p>
<h3> CSS 2.1 Method </h3>
<p> Using <acronym title="Cascading Style Sheets">CSS</acronym> 2.1 the method is pretty simple. It takes advantage of the <code class="codecolorer css default"><span class="css"><span style="color: #00AA00;">:</span>before</span></code> and <code class="codecolorer css default"><span class="css"><span style="color: #00AA00;">:</span>after</span></code> pseudo classes, and the <code class="codecolorer css default"><span class="css"><span style="color: #000000; font-weight: bold;">content</span></span></code> property. Although this property is pretty limited in what it can do, it does what we need. </p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666ff;">.pageWrap</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">&#123;</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;./absolute/path/to/image OR ./relative/path/to/image based on the HTML <br />
file itself rather than the CSS file. (if it doesnt work try with absolute pathing). ex:<br />
&nbsp;url(&quot;</span>./stuff.jpg<span style="color: #ff0000;">&quot;) url(&quot;</span>./stuff2.jpg<span style="color: #ff0000;">&quot;) url(&quot;</span>./stuff3.jpg<span style="color: #ff0000;">&quot;); <br />
/* Important make sure you dont use &quot;</span><span style="color: #00AA00;">,</span><span style="color: #ff0000;">&quot; to separate the urls */<br />
display: none;<br />
}</span></div></div>
<p> We load the images and then we use display: none so they dont show up, but they are cached so when you load the image within a &lt;img&gt; tag it will show up instantly. </p>
<p> The benefits of this method is that it has a fairly wide acceptance among browser vendors, IE8/Firefox 2+/Google Chrome 1+/Safari 3+. For Previous IE versions you could load up a <acronym title="Javascript">JS</acronym> preload. </p>
<h3> CSS 3.0 Method </h3>
<p> Using the <acronym title="Cascading Style Sheets">CSS</acronym> 3.0 is even simpler, it takes advantage of the modifications done to the <code class="codecolorer css default"><span class="css"><span style="color: #000000; font-weight: bold;">background</span></span></code> property by being able to load multiple images with 1 element. Regardless of what the browser can support we can always create a dummy element and load all the images and then give it a <code class="codecolorer css default"><span class="css"><span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span></span></code> we need to use in a &lt;img&gt; tag. </p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6666ff;">.el</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;./images/image1.jpg&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> <br />
&nbsp; &nbsp;<span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;./images/image2.jpg&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span> <br />
&nbsp; &nbsp;<span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;./images/imageN.jpg&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></div>
<p> The huge downside of this method is that currently only Google Chrome 4 and Safari 4 support these improvements to the <code class="codecolorer css default"><span class="css"><span style="color: #000000; font-weight: bold;">background</span></span></code> property. Firefox is due to support them in Firefox 3.6 which at the time of this post is in beta 5 so it will be released in 2-3 weeks. IE will probably support <acronym title="Cascading Style Sheets">CSS</acronym>3 properties when IE9 will be available, which according to the IEBlog will happen in a year or so. </p>
<p> I am still looking for a way to preload <acronym title="Cascading Style Sheets">CSS</acronym> images into play, so when they are requested again, they will use their cached versions instead of being downloaded again. </p>
]]></content:encoded>
			<wfw:commentRss>http://alexdweb.com/blog/2010/01/07/preloading-css-images-with-css-2-1-and-css-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webkit Absolute Positioned Floated Element Bug</title>
		<link>http://alexdweb.com/blog/2009/05/27/webkit-absolute-positioned-floated-element-bug/</link>
		<comments>http://alexdweb.com/blog/2009/05/27/webkit-absolute-positioned-floated-element-bug/#comments</comments>
		<pubDate>Wed, 27 May 2009 08:26:16 +0000</pubDate>
		<dc:creator>Dinulescu Alexandru Adrian</dc:creator>
				<category><![CDATA[XHTML/CSS]]></category>
		<category><![CDATA[Chrome Bug]]></category>
		<category><![CDATA[Safari Bug]]></category>
		<category><![CDATA[Webkit]]></category>

		<guid isPermaLink="false">http://alexdweb.com/blog/?p=29</guid>
		<description><![CDATA[Hello While i was building a webpage for a client, i came across a very peculiar issue. It seems that webkit (safari/google chrome) have troubles understanding an absolutely positioned floated element This is the HTML for the file in question. &#60;ul&#62; &#160; &#160; &#160;&#60;li class=&#34;selected&#34;&#62;&#60;a href=&#34;#&#34;&#62;&#60;span&#62;Ficha Tecnica&#60;/span&#62;&#60;/a&#62;&#60;/li&#62; &#160; &#160; &#160;&#60;li&#62;&#60;a href=&#34;#&#34;&#62;&#60;span&#62;Ubiccaon Y Aroso&#60;/span&#62;&#60;/a&#62;&#60;/li&#62; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p> Hello </p>
<p> While i was building a webpage for a client, i came across a very peculiar issue. It seems that webkit (safari/google chrome) have troubles understanding an absolutely positioned floated element </p>
<h3>This is the <acronym title="HyperText Markup Language">HTML</acronym> for the file in question.</h3>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/ul.html"><span style="color: #000000; font-weight: bold;">ul</span></a>&gt;</span> <br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;selected&quot;</span>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;&lt;<a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;</span>Ficha Tecnica<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;&lt;<a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;</span>Ubiccaon Y Aroso<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;&lt;<a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;</span>Galeria De l'image<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;&lt;<a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;</span>Pricipaples operandos<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;last&quot;</span>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;&lt;<a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;</span>Mas Information<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/span.html"><span style="color: #000000; font-weight: bold;">span</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/li.html"><span style="color: #000000; font-weight: bold;">li</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/ul.html"><span style="color: #000000; font-weight: bold;">ul</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clear&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stuff&quot;</span>&gt;</span><br />
Relative Positioned Stuff Goes here<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></div>
<p><span id="more-29"></span></p>
<h3>The CSS looked like this</h3>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.<span style="color: #000000; font-weight: bold;">content</span> <span style="color: #6666ff;">.container</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">600px</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
&nbsp;ul <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">32px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
&nbsp;ul li <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
ul li<span style="color: #6666ff;">.last</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;./../img/containerB.png&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> &nbsp;<br />
<span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
&nbsp;ul li a <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#616266</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;./../img/containerB.png&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <br />
<span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">no-repeat</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span> <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span><br />
ul li a span <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">11px</span> <span style="color: #933;">5px</span> <span style="color: #933;">7px</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;./../img/containerInnerB.png&quot;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background-repeat</span><span style="color: #00AA00;">:</span> <br />
<span style="color: #993333;">repeat-x</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background-position</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">bottom</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
ul li<span style="color: #6666ff;">.selected</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
ul li<span style="color: #6666ff;">.selected</span> a span <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#15575d</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><br />
ul li a<span style="color: #3333ff;">:hover</span><span style="color: #00AA00;">,</span> .<span style="color: #000000; font-weight: bold;">content</span> <span style="color: #6666ff;">.container</span> ul li a<span style="color: #3333ff;">:focus </span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span><br />
.<span style="color: #000000; font-weight: bold;">clear</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">both</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></div></div>
<p>This happens in Safari/Google Chrome</p>
<div>
<a href="http://alexdweb.com/blog/2009/05/27/webkit-absolute-positioned-floated-element-bug/imagen-12/" rel="attachment wp-att-36"><img src="http://alexdweb.com/blog/wp-content/uploads/2009/11/imagen-12.png" alt="imagen-12" title="imagen-12" width="790" height="375" class="aligncenter size-full wp-image-36" /></a>
</div>
<p> The image shows HOW Safari/Google Chrome behaves, IE6/IE7/FF3/Opera9.5+ work ok, but everything based on webkit breaks </p>
<p> After fiddling around with the CSS lines i think i found out what happens </p>
<p> Given that the <code class="codecolorer html4strict default"><span class="html4strict">ul</span></code> element is absolute positioned, it is OUTSIDE the normal pageflow, however it breaks everything after it, because <code class="codecolorer html4strict default"><span class="html4strict">li</span></code> elements are floated. so an empty clear <code class="codecolorer html4strict default"><span class="html4strict">div</span></code> should be put there. In normal circumstances like these </p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;floatLeft&quot;</span>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;floatRight&quot;</span>&gt;</span><br />
<br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clear&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></div></div>
<p> everything after the 2 floated elements will resume it&#8217;s normal position, however in this case, since the <code class="codecolorer html4strict default"><span class="html4strict">LI</span></code> elements are somehow outside the page-flow but they are floated, they break the pageflow. Now the surprising thing is that the div.clear is not doing it&#8217;s job to put the page in order in webkit. I dont know why since it&#8217;s a block type element and in all other cases it works, here however you need to have him not only as a block element but also it needs to have a height of 1px or more. </p>
<p> After putting the height 1px to the clear div, it started to behave properly in Safari / Chrome. Very weird bug, even more weirder than those on <acronym title="Internet Explorer">IE</acronym>6/<acronym title="Internet Explorer">IE</acronym>7</p>
<p> Questions in comments </p>
<p> Cheers AlexD </p>
]]></content:encoded>
			<wfw:commentRss>http://alexdweb.com/blog/2009/05/27/webkit-absolute-positioned-floated-element-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

