View Full Version : Preload background img attached with CSS?
Is it possible to preload a background image that is attached using CSS?
Dreamweaver doesn't give you the option to preload the image as it doesn't see it as being IN the page.
02-28-2004, 01:13 PM
You can always make your own preloader! CSS doesn't have the ability to do this.
var my_css_bg = new image;
my_css_bg.src = 'css_bg.gif';
That's all it requries ( I think ), I'm not a JS guru though .. if it's wrong I'm sure someone else will correct me. :)
02-28-2004, 02:50 PM
Originally posted by Mhtml
var my_css_bg = new Image;;)…
S'cuse my ignorance but that goes where exactly?
Thanks for the reply.
02-28-2004, 08:04 PM
Best place would generally be the <head> section, but I suppose it could go anywhere.
Thanks for the help.
I have found that what I was using did work (helluva complicated) on IE and Netscape FOR PC. But of course it doesn't behave like it should on IE5 for Mac which is what I'm working on :p .
Why oh why can't they just make all browsers and OS's compatable? Oh I know... 'cos then I might not sit here till 2.30am on a Saturday night fighting with it!
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.