944,150 Members | Top Members by Rank

Ad:
Oct 11th, 2009
0

IE7 loading hidden stylesheet images

Expand Post »
Hi

I have a page with a bunch of divs set to display:none with 70kb background images. As buttons are clicked the divs are displayed. The background images are specified in an external stylesheet, pc firefox, mac ff, mac safari and every real browser ignors them until the div is set to display:block, awesome. IE7 still loads every single image when loading the site, is there a way around this? Its about 40 images so obv this is effecting load time
Similar Threads
Reputation Points: 37
Solved Threads: 1
Posting Whiz in Training
cmills83 is offline Offline
249 posts
since Jun 2004
Oct 11th, 2009
0
Re: IE7 loading hidden stylesheet images
Click to Expand / Collapse  Quote originally posted by cmills83 ...
Hi

I have a page with a bunch of divs set to display:none with 70kb background images. As buttons are clicked the divs are displayed. The background images are specified in an external stylesheet, pc firefox, mac ff, mac safari and every real browser ignors them until the div is set to display:block, awesome. IE7 still loads every single image when loading the site, is there a way around this? Its about 40 images so obv this is effecting load time
Dynamicity is and should remain a javascript responsibility not CSS.
Images should be ready for interaction when page fires onload event no matter if their display property is set to none.

Although some new wannabe FAST browsers are using the cheat you mention and hundreds of others to compensate for their poor performance.

Each and every hardcoded element of the page content is required to be ready for display as soon as you've interacted with it, and every REAL responsible browser should provide it with competence.

The real conventional and traditional solution:
I believe you are using script to handle the display property of those divs and script is what you should use to set their background image property along with their display properties simultaneously.
Reputation Points: 120
Solved Threads: 61
Posting Pro
Troy III is offline Offline
513 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Add/Edit/Delete From Input to text area
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Comment form not appearing???





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC