Alternating CSS classes for dynamic content [closed]

Use PHP modulo operator (%) to determine the classes and use CSS to float them all left and set clear:right to the odd class.

Kind of hard to picture how you’re pulling the images without the code though. Could you post a clip of the code you used to pull the images?

If not you can resort to JS to add the classes dynamically after the page loads shudder.