View Full Version : Image Loading

Tony M
Jul 27th, 2010, 08:24 AM
Is there is a way to make an image load after all the page loads?
For example: I had an image at the center of My page, but I want this image to be loaded after that all the page loaded (the page will load firstly without loading this image, then when all the elements of the page are loaded the image at the center of the page will begins to load), without changing the position of this image. :thumbsup:

Jul 27th, 2010, 02:22 PM
You could just hide the image with display:none by default, and then set it to visible when the page has loaded with javascript? Not sure if that's what you're looking for, but it'll work.

Put this in your body tag: (i'm not a javascript ninja, but i think that's correct)

<body onload="document.getElementById('showonload').style.display = 'block';">and of course set the image to hidden by default...:

<img id="showonload" src="..." style="display: none;" />

Tony M
Jul 27th, 2010, 02:42 PM
No, I want the image to be Loaded when all the page finished loading, and not to be only displayed at final, displayed and loaded at final at the same time :confused: (I want the image to load at final but without changing it's location)

Jul 27th, 2010, 02:47 PM
It shouldn't take that long for the page to load anyways. Is it a big page? Sorry, no more suggestions.. :/

Tony M
Jul 27th, 2010, 02:58 PM
Is there a way to make it HTML OR CSS and not JavaScript ?

Jul 27th, 2010, 02:59 PM
Not that i know of, nope.