<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB"><title>Comments on Preload Images with CSS - AddedBytes.com</title><link rel="alternate" type="text/html" href="http://www.addedbytes.com/article/preloading-images-with-css/" /><link rel="self" type="application/xml" href="http://www.addedbytes.com/article/preloading-images-with-css/comments/atom/" /><subtitle>Latest comments on Preload Images with CSS on AddedBytes.com</subtitle><author><name>Dave Child</name></author><updated>2004-12-23T10:13:43Z</updated><id>tag:addedbytes.com,2004:209</id><!-- ckey="76C662BB" --><entry><title>Comment on Preload Images with CSS</title><link rel="alternate" type="text/html" href="http://www.addedbytes.com/article/preloading-images-with-css/comments/" /><summary type="text">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!</summary><id>tag:addedbytes.com,2009:111498</id><published>2009-06-22T16:10:26+01:00</published><updated>2009-06-22T16:10:26Z</updated></entry><entry><title>Comment on Preload Images with CSS</title><link rel="alternate" type="text/html" href="http://www.addedbytes.com/article/preloading-images-with-css/comments/" /><summary type="text">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</summary><id>tag:addedbytes.com,2009:110942</id><published>2009-05-22T08:28:56+01:00</published><updated>2009-05-22T08:28:56Z</updated></entry><entry><title>Comment on Preload Images with CSS</title><link rel="alternate" type="text/html" href="http://www.addedbytes.com/article/preloading-images-with-css/comments/" /><summary type="text">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.</summary><id>tag:addedbytes.com,2009:109277</id><published>2009-03-03T14:08:07+00:00</published><updated>2009-03-03T14:08:07Z</updated></entry><entry><title>Comment on Preload Images with CSS</title><link rel="alternate" type="text/html" href="http://www.addedbytes.com/article/preloading-images-with-css/comments/" /><summary type="text">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 ?</summary><id>tag:addedbytes.com,2009:108576</id><published>2009-02-05T18:54:26+00:00</published><updated>2009-02-05T18:54:26Z</updated></entry><entry><title>Comment on Preload Images with CSS</title><link rel="alternate" type="text/html" href="http://www.addedbytes.com/article/preloading-images-with-css/comments/" /><summary type="text">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</summary><id>tag:addedbytes.com,2009:108387</id><published>2009-01-26T05:15:52+00:00</published><updated>2009-01-26T05:15:52Z</updated></entry><entry><title>Comment on Preload Images with CSS</title><link rel="alternate" type="text/html" href="http://www.addedbytes.com/article/preloading-images-with-css/comments/" /><summary type="text">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.</summary><id>tag:addedbytes.com,2008:105103</id><published>2008-10-02T18:56:01+01:00</published><updated>2008-10-02T18:56:01Z</updated></entry><entry><title>Comment on Preload Images with CSS</title><link rel="alternate" type="text/html" href="http://www.addedbytes.com/article/preloading-images-with-css/comments/" /><summary type="text">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!</summary><id>tag:addedbytes.com,2008:97162</id><published>2008-06-26T13:46:34+01:00</published><updated>2008-06-26T13:46:34Z</updated></entry><entry><title>Comment on Preload Images with CSS</title><link rel="alternate" type="text/html" href="http://www.addedbytes.com/article/preloading-images-with-css/comments/" /><summary type="text">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;???</summary><id>tag:addedbytes.com,2008:96698</id><published>2008-06-09T23:58:14+01:00</published><updated>2008-06-09T23:58:14Z</updated></entry><entry><title>Comment on Preload Images with CSS</title><link rel="alternate" type="text/html" href="http://www.addedbytes.com/article/preloading-images-with-css/comments/" /><summary type="text">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!</summary><id>tag:addedbytes.com,2008:94633</id><published>2008-05-04T08:36:28+01:00</published><updated>2008-05-04T08:36:28Z</updated></entry><entry><title>Comment on Preload Images with CSS</title><link rel="alternate" type="text/html" href="http://www.addedbytes.com/article/preloading-images-with-css/comments/" /><summary type="text">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</summary><id>tag:addedbytes.com,2008:92623</id><published>2008-04-18T12:51:58+01:00</published><updated>2008-04-18T12:51:58Z</updated></entry></feed>