How to place the div in the zig zag order based on the window width? : As im trying the align the div in zig zag order in the for loop. 
So on the fifth div i need to wrap the div and start from right to left so on..
Please refer to the image. 
[![enter image description here][1]][1]


  [1]: https://i.stack.imgur.com/7qHSe.png

So please suggest how to achieve this based on the width on the window.
 