Image style (and thanks)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
First I want to thank those who answered my previous question).

I have an image that I'm going to use javascript to fade in. Unfortunately,
in IE I see the image blink as it's being loaded, then go to the fade-in.
What can I do to prevent the image from displaying at all until the form is
loaded - at which point I'll fade it in.


Re: Image style (and thanks)

Quoted text here. Click to load it

Set the default "display" style to "none" so the image won't be visible when
the page loads?

Got a link?

Re: Image style (and thanks)

Quoted text here. Click to load it

visibility: hidden; would be better as it reserves the space for the
element, so the pag won't need to reflow when the fade in starts.

Also, don't do this in the main stylesheet. Do it via a style that's
created by JavaScript (I'm assuming that the fade effect is JS
powered) so that users without JS don't miss out on the image

So in the <head> of the page include a script that's executed
if (check for methods used during the fade effect, can't check for all
objects yet as the page hasn't finished loading) {
document.write('<style type="text/css">.foo

and then the image <img class="foo"> will be initially hidden. Later
an onLoad event can change the visibilty and launch the fade in.


"My theories appal you, my heresies outrage you,
 I never answer letters and you don't like my tie."  - The Doctor

Site Timeline