Sent by Phillip Smith on 12 May 2005 15:03
Hi there,
First post to this list in years. Happy to know the list is still alive
and strong. :-)
Recently, I had an organization ask me to add random rotation to the
header image on their site, which has a photograph of a progressive
celebrity and a nice endorsement. The header image itself is called in
the style sheet and makes use of one of the conventional image
replacement techniques to hide the <h1> text and drop in the header
image.
So, my thinking was to replace
background-image: url(../med/this_banner.gif); background-repeat:
no-repeat;
with
background-image: url(../med/rotate_home/rotate.php);
background-repeat: no-repeat;
Where rotate.php contains a simple random rotation script (which calls
the images) that has worked nicely in the past. Call my crazy for
referencing a .php script in the style sheet -- but I've used it before
in an <img> tag and thought "why not!"
Anyway, the techniques works fine for Safari and Firefox on the Mac,
but appears to simple cache the first image for most PC browsers.
Wondering if anyone has...
A) Tried this approach for random rotation before?
B) Has a better way to randomly rotate an image via CSS?
C) Knows why the method I've tried is caching on PC browsers?
D) Knows of a fix to solve the caching issue?
You can see the static header site here: http://thismagazine.ca
And the site with rotation is here: http://dev.thismagazine.ca
(If you refresh the page, the portrait/endorsement should change)
I'm set to digest -- so a CC to me personally would be greatly
appreciated.
Many thanks in advance,
Phillip.
--
Phillip Smith,
Simplifier of Technology
Community Bandwidth
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/