On 4/22/10 2:54 AM, Chris Blake wrote:
> Hi,
>
> I have applied a simple transparent PNG to my wrapper div. I would
> like that to load as one of the first images. What is the best way
> to do this?
>

Here's a solution that worked for me: In the HTML, add an image tag near
the top of the BODY section, and give the SRC attribute the path to the
image to preload, with width=1, height=0 to hide it. The width makes
sure the image is requested as soon as the browser gets to this point in
the page.

Use an empty ALT value. If this interferes with your layout,
additionally put the image(s) for preloading in a DIV and position that
DIV "absolute" with a large negative LEFT value.

There are likely downsides to this, but so far I have not come across any.

Cordially,
David
--

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to