[RESOLVED] Remove quare when image is not loaded yet...
A small question,
Is it possible to remove the square that you see when an image isnt loaded completly yet?
I woul like to have it plain white (as is the background of the site)
Specify the width and height of the image so the web browser can just reserve the required space for the image without showing the small square.
i had done this using a trick maybe helps you too.
<img src="blank.gif" width="100" height="100" style="background: url(image.jpg);" />
put a blank gif or png as an image and the original image as its background
but make sure blank image must exists
width and height is also set properly
and keep in mind its just a trick :P
ah, i'll try it out! thanks
Adding a background image to a foreground image is really an overkill if not counterproductive. Yes, it's a trick but one with a price: an additional http request to the server which just increases the page download time. Besides, using inline style should only be a last resort, read when really necessary.
But why you want to do so???????
I mean it is just a matter of some seconds to reload the image on the page...
Any specific reason behind doing it????
sometimes, th eimages are not shown fast enough.
at that moment, briefly, a square where the image should be shown is displayed (square as big as the image, not the little red cross thing)
this square has borders etc...
i wander how i can remove these squares, if even possible...
hMMm, i think this issue is with a specific browser. chrome does not show this kind of the box while loading an image. you can optimize image file size and set some cache. also you can set image' style "display: none;" and then you can use onload event to show the image.
Thank you ZABI :-)
Thats why a started this treath:
Resolved as far as dealing with the problem :-)
its gr8 if it works
where r u from by the way ? u can PM if necessary
Originally Posted by Nomistake
Ohkzz.... Now, got your point...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)