Log in

View Full Version : HOW TO: PHP INCLUDE on INTRO PAGE (for CSS image preloads)



LisaMarie
06-25-2011, 07:36 PM
Hi Everyone, any advice or other suggestions would be greatly appreciated!

Here's what I'm trying to do: I would like to have all of my images for the entire multi-page website to be preloaded during an "loading" animated intro....

I wanted to use CSS however, instead of JS, so would this work?
HAVING ALL PRELOADING CSS IN ONE PHP FILE AND USING THAT PHP FILE AS AN INCLUDE ON THE LOADING PAGE???
Am I way off?

If not, How else could I approach image preloading to cache from the intro page? Open to any and all suggestions...

www.lisamarie.biz is the site, if you wanted to check it out. Be kind, Work in progress. Thanks a bunch! Looking forward to hearing back! :)

ggalan
06-25-2011, 07:53 PM
how about this


<div id="invis" style="display:none">
<img src='myPic1.jpg' />
<img src='myPic2.jpg' />
<img src='myPic3.jpg' />
<img src='myPic4.jpg' />
</div>

LisaMarie
06-25-2011, 08:13 PM
Right, ggalan, Thank you... That's sort of the CSS I was thinking...

But moreso than the coding of the CSS right now my question is with whatever CSS coding I use to preload: Would using a php file of the CSS as an php-include to the loading page work to cache ALL of the other pages on the site???

I just wanted all of the images to preload from ONE file, I guess is what I'm trying to do....... Know what I mean? Should I just put all the CSS in the loading page and forget PHP include? It is the same difference?

ggalan
06-25-2011, 11:34 PM
i would imagine that there are many ways to achieve this.

HAVING ALL PRELOADING CSS IN ONE PHP FILE AND USING THAT PHP FILE AS AN INCLUDE ON THE LOADING PAGE
that sounds good, why dont you try and post your code