I have been trying to dynamically add elements to a webpage using php. My goal is to have the images alternate between left and right for each item.
Even after experimenting with nth odd/even, I still can't seem to make it work.
Could there be something crucial that I'm overlooking?
For clarity, here is an example of what will be generated from my php code. I intend for the first image to appear on the left side and the second image on the right side.