CSS and Image Swap on Reload

They have: 26 posts

Joined: Apr 2002

Hi Folks

On a Website I'm planning I've created a header/banner for the Site in two parts.

It's intended that the first part of the banner will remain constant, but the second part will be a photo of a staff member which will change from refresh to refresh/visit to visit.

I've seen a Javascript that will do this
http://www.csus.edu/web/tutorials/reloadswap.htm

But can CSS do the same (or is there a better script)?

Thanks

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

Don't think you can do it with CSS but can be done in PHP or ASP, which IMHO is better because you cna disable javascript.

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

It should be done with JavaScript or a server-side language. CSS is not a programming language so much as a contextual language.

They have: 26 posts

Joined: Apr 2002

Thanks Renegade and Suzanne

Megan's picture

She has: 11,421 posts

Joined: Jun 1999

Is this what you're looking for:

http://www.alistapart.com/articles/randomizer/

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.