Hello,
Alright, so I came up with idea that it would be nice if I could have my <?php echoed ?> div's with different appearance.
On my website I collect stories from database and display them in div's.
Here is example of how I echo divs:
The question is how can I randomly change style of "story" div? say to make it in different colors. For example if you visit my site http://inelmo.com you will see that all div's there have same style, but I wantthem to be different.
I was thinking of somehow giving a random class to div say "story1" "story2" etc. and then have different styles for them in css, but I don't know how to do it.
If you need more information please ask questions and Thank you )))
Alright, so I came up with idea that it would be nice if I could have my <?php echoed ?> div's with different appearance.
On my website I collect stories from database and display them in div's.
Here is example of how I echo divs:
Code:
<?php $articleDisplayList .= '<div class="story"> ' . $Story . '</div>' ?> <!doctype> <html> <head> <style> /* Some CSS HERE */ </style> </head> <body> <?php echo "$articleDisplayList"; ?> </body> </html>
I was thinking of somehow giving a random class to div say "story1" "story2" etc. and then have different styles for them in css, but I don't know how to do it.
If you need more information please ask questions and Thank you )))
Comment