nplib is right and way ahead of me on these types of issues (see his shield ;-)...but...if what you're after isn't necessarily just pre-loading script, but a mouse-over function with your links, that is indeed possible with CSS.
For example, let's say you have an image called "homepage_image.jpg" and when you scroll over it you want it to show "homepage_image_over.jpg" because it's an image link to your homepage. Then you could use CSS. Depending on your image, where it is located, etc...here's just a possible example:
This would go in your external or doc-level style sheet:
.homelink a:link, .homelink a:visited, .homelink a:active {
background: url('/images/homepage_imag
width:200px; /* or whatever */
height: 200px; /* or whatever */
}
.homelink a:hover{
background: url(/images/homepage_image
width:200px;
height:200px;
}
Then when you want to show your link:
<a href="home.html" class="homelink"> </a
If that's the kind of thing you're after -- the mouseover functionality--it can be done with CSS. But like nplib says -- the preloading function you can't do with PHP or CSS.
Main Topics
Browse All Topics





by: nplibPosted on 2008-03-11 at 16:22:37ID: 21101454
I don't know python, but what your asking is impossible.
CSS is for redering HTML
PHP is a server side scripting language
and the reason that javascript works the way it does, is because it will load all the images before the body of the website loads, then load the images.