Forum Moderators: not2easy

Message Too Old, No Replies

Random color change with CSS

Is it possible to do random color with a line of code

         

pekr

10:33 am on May 1, 2009 (gmt 0)

10+ Year Member



Hi there

Im building a new website. There will be a gallery that is loaded from a DB with asp/sql.

Is it possible with CSS (or maybe Javascript) to assign a different background color to each picture box (the picture will sit inside a css div which is 3 pixel wider on each side).

Thanks
Peter

swa66

8:51 pm on May 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld! [webmasterworld.com]

Javascript can do (pseudo) random, CSS as such has no direct support for such things.

pekr

2:52 am on May 2, 2009 (gmt 0)

10+ Year Member



Thanks you.

Do you know how it is possible?

Best
Peter