Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Background to load first?

Status
Not open for further replies.

Christylh8

IS-IT--Management
Jul 14, 2002
25
US
I have a page with a crucial background in which
I would like for it to load before the rest of the elements.

I know that HTML uniformly has the browser to load the smallest weight elements first, but is there any way I can bypass this?

Thanks!

C.
 
If it were I, I'd use javascript to preload the background image. Search google for "javascript preload image" for lots of tutorials on that. That way, the image would already be loaded, and the background should therefore appear first, I think.

Rick It's a pleasure to know that I've helped you. If I have,
please click the link below to let me know. :)
 
or try loading it in the <head> using a style sheet:

<head>
<style type=&quot;text/css&quot;>
body {
background-image:url(myImage.gif);
}
</style>
</head>
======================================

if (!succeed) try();
-jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top