I am facing an issue with managing white spaces: I have a variety of elements set to float:left that need to be arranged in 2 columns, each with different heights.
https://i.sstatic.net/MTYfI.jpg
To simplify the process, I specifically need element 3 from the image to come right after element 1 while maintaining the padding.
I am utilizing Plain CSS and AngularJS without any additional JS modules, as these elements are frequently loaded. It is crucial for me to avoid using jQuery at all costs.
Important update:
The approach of using float:left or float:right based on child even or odd is not feasible: Float multiple fixed-width / varible-height boxes into 2 columns
Important update:
There are instances where I only need to align 2 elements, one below the other. Therefore, I am interested in applying a specific property to element 1.