Is there a way to make a background image appear before other images?
Posted: 11 May 2008 05:00 PM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  40
Joined  09-11-2007

I have a DIV container with a background image. The background image is a 4 KB repeating stripe. Also in the DIV—in the foreground, so to speak—are lots of thumbnail photographs.

The thumbnail photographs always start loading before the background image, even though the background image:
- appears first in the code
- is a smaller file size than the thumbnail photographs
- is already in the cache

Is there any way to force the background image to display first?

 Signature 

ExpressionEngine 1.6.7 Build: 20090515

Profile
 
 
Posted: 11 May 2008 05:05 PM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6243
Joined  08-04-2002

I looked into this a long time ago and as I recall, it varies from browser to browser. Could maybe use an “onload” function for the images so they don’t even begin to load until the rest of the page is done.

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120547 Total Logged-in Users: 60
Total Topics: 126600 Total Anonymous Users: 39
Total Replies: 665564 Total Guests: 359
Total Posts: 792164    
Members ( View Memberlist )
Newest Members:  ClarkKentBaoHeredamferDr.JohnRamin.Hossainikreesmheatbluemonstasweeper240andrew n