<?xml version="1.0"?><rss version="2.0"><channel><title>Comments on Preload Images with CSS - AddedBytes.com</title><link>http://www.addedbytes.com/article/preloading-images-with-css/</link><description>Latest comments on Preload Images with CSS on AddedBytes.com</description><!-- ckey="76C662BB" --><item><title>Comment on Preload Images with CSS</title><link>http://www.addedbytes.com/article/preloading-images-with-css/comments/</link><guid>http://www.addedbytes.com/article/preloading-images-with-css/comments/</guid><description>Comment by Joel G ( &lt;a href="http://www.jagdesignideas.com"&gt;http://www.jagdesignideas.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;After reading all this and *most* of the comments, I tried just adding div wrappers around my list items, and adding the rollover background to them with an id tag.&lt;br /&gt;
&lt;br /&gt;
My challenge was that I'm building a list of categories (for my portfolio) as a navigation for the portfolio categories. But I'm using my text in the images, so I need separate backgrounds for each category, being 9 total. &lt;br /&gt;
&lt;br /&gt;
So what I did and seemed to work out well was to wrap each &lt;li&gt; in &lt;div&gt; tags, and give each a separate id, such as: &lt;br /&gt;
&lt;div id=&quot;preload_print_ro&quot;&gt;...then target each one with just a CSS rule for the background image. &lt;br /&gt;
&lt;br /&gt;
Now, instant rollovers, no flicker!</description></item><item><title>Comment on Preload Images with CSS</title><link>http://www.addedbytes.com/article/preloading-images-with-css/comments/</link><guid>http://www.addedbytes.com/article/preloading-images-with-css/comments/</guid><description>Comment by Bjorn Enki ( &lt;a href="http://www.bjornenki.com"&gt;http://www.bjornenki.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;A technique that I use drastically reduces the number of HTTP requests required for image preloading in addition to eliminating the need for any additional code to preload images. I've written a brief post on it here: http://www.bjornenki.com/blog/preload-roller-images-without-css-javascript</description></item><item><title>Comment on Preload Images with CSS</title><link>http://www.addedbytes.com/article/preloading-images-with-css/comments/</link><guid>http://www.addedbytes.com/article/preloading-images-with-css/comments/</guid><description>Comment by danreb ( &lt;a href="http://www.danreb.com"&gt;http://www.danreb.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;well after reading all this I ended using an iframe for our company site http://www.teamquest-inc.com.ph  , this is because I need to preload more than ten image and a swf/flash file that will be used in other page of my site, so in the home page i insert iframe in a div position off screen. this works for our company site.</description></item><item><title>Comment on Preload Images with CSS</title><link>http://www.addedbytes.com/article/preloading-images-with-css/comments/</link><guid>http://www.addedbytes.com/article/preloading-images-with-css/comments/</guid><description>Comment by Rakesh ( &lt;a href=""&gt;&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;I am facing a totally opposite issue :) Is there a way to &quot;prevent&quot; loading of images until some action. I have a div which has 100+ images in it. I want to show the div only on some action by the user. Even though the div has display:none set, the images gets preloaded. Is there a way to solve this ?</description></item><item><title>Comment on Preload Images with CSS</title><link>http://www.addedbytes.com/article/preloading-images-with-css/comments/</link><guid>http://www.addedbytes.com/article/preloading-images-with-css/comments/</guid><description>Comment by Joseph ( &lt;a href="http://www.albaedit.com"&gt;http://www.albaedit.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;I have been using CSS display:none effectively (.hiddenPic {display:none;}, but I'm not testing with any older browsers, which is a worry. &lt;br /&gt;
&lt;br /&gt;
I just tried #39 (Dameian) and it works fine for everything EXCEPT Chrome, which puts the little 10x10 icons of the images in the lower left corner, obviously not processing the -1000 positions.&lt;br /&gt;
&lt;br /&gt;
I then added the .hiddenPic class to the img lines, and now even Chrome is handling it correctly, as expected since it is the new kid on the block.&lt;br /&gt;
&lt;br /&gt;
Thanks, all. Great site.&lt;br /&gt;
Joseph</description></item><item><title>Comment on Preload Images with CSS</title><link>http://www.addedbytes.com/article/preloading-images-with-css/comments/</link><guid>http://www.addedbytes.com/article/preloading-images-with-css/comments/</guid><description>Comment by George ( &lt;a href="http://www.gcalderon.com"&gt;http://www.gcalderon.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;A co-worker of mine suggested using CSS sprites technique (http://alistapart.com/articles/sprites/), since the bg image is loaded when you load the pre-hover state of the element, all you would need to do is specify background positioning for the css hover declaration.</description></item><item><title>Comment on Preload Images with CSS</title><link>http://www.addedbytes.com/article/preloading-images-with-css/comments/</link><guid>http://www.addedbytes.com/article/preloading-images-with-css/comments/</guid><description>Comment by Dameian ( &lt;a href="http://www.dameian.com"&gt;http://www.dameian.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;Here is what I do. If this helps anyone, terrific... I'll go buy myself a snickers bar and feel all fuzzy inside. If not... I'll sink into a deep depression and rock back and forth in the darkest corner of my office muttering &quot;Mad Word&quot; by Tears for Fears...&lt;br /&gt;
&lt;br /&gt;
In my CSS:&lt;br /&gt;
&lt;br /&gt;
#preloader {&lt;br /&gt;
position:absolute;&lt;br /&gt;
top:-1000px;&lt;br /&gt;
height:100px;&lt;br /&gt;
width:100px;&lt;br /&gt;
overflow:hidden;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Then at the very top of my page under the body tag:&lt;br /&gt;
&lt;br /&gt;
&lt;div id=&quot;preloader&quot;&gt;&lt;br /&gt;
&lt;img src=&quot;preload-image-1.gif&quot; height=&quot;10&quot; width=&quot;10&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;preload-image-2.gif&quot; height=&quot;10&quot; width=&quot;10&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;preload-image-3.gif&quot; height=&quot;10&quot; width=&quot;10&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
etc...&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
This will not be visible on your pages, and *should* take care of any browsers that do not render images if a &quot;0&quot; size is given to them or if they are &quot;hidden&quot;. &lt;br /&gt;
&lt;br /&gt;
I actually use this to eliminate the delay that browsers seem to have loading CSS background images but I can't see how it wouldn't work for rollover images as well. &lt;br /&gt;
&lt;br /&gt;
I have tested this using FF and Safari on Mac as well as IE6 and IE7 on Windows. I have not tested it in the lesser used browsers because, truth be told, shooting myself in the face right this second with a 12 gauge shot gun would be a more joyous alternative to the self-torture I'd subject myself too if I tried to please the logic/rendering engines of every single browser. In the words of the late, great Bob Marley: &quot;You can't fool all the people all the time...&quot;&lt;br /&gt;
&lt;br /&gt;
Cheers!</description></item><item><title>Comment on Preload Images with CSS</title><link>http://www.addedbytes.com/article/preloading-images-with-css/comments/</link><guid>http://www.addedbytes.com/article/preloading-images-with-css/comments/</guid><description>Comment by itruscan ( &lt;a href="http://www.webchiator.exofire.net/newdoc/"&gt;http://www.webchiator.exofire.net/newdoc/&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;joel watson  #preload { height: 0; overflow: hidden; } &lt;br /&gt;
&lt;br /&gt;
&lt;div id=&quot;preload&quot;&gt;&lt;img src=&quot;layout1.png&quot; /&gt;&lt;img ... &gt;&lt;/div&gt;  what to put inside &lt;img ...&gt;???</description></item><item><title>Comment on Preload Images with CSS</title><link>http://www.addedbytes.com/article/preloading-images-with-css/comments/</link><guid>http://www.addedbytes.com/article/preloading-images-with-css/comments/</guid><description>Comment by Adaptiv Media ( &lt;a href="http://www.adaptivmedia.com/"&gt;http://www.adaptivmedia.com/&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;This is absolutely brilliant. I have been searching for a non-javascript solution to do this for ages. Cannot thank you enough. ILove[redacted].com!</description></item><item><title>Comment on Preload Images with CSS</title><link>http://www.addedbytes.com/article/preloading-images-with-css/comments/</link><guid>http://www.addedbytes.com/article/preloading-images-with-css/comments/</guid><description>Comment by Jad ( &lt;a href="http://www.anahaifa.com"&gt;http://www.anahaifa.com&lt;/a&gt; )&lt;br /&gt;&lt;br /&gt;thanks!! nice one</description></item></channel></rss>