I’m trying to achive an effect where severeal absolutely positioned elements would behave as they were being floated to the left. I’m trying to avoid using classes or nth-child selectors because the number of divs being absolutely positioned is dynamic.
So the div width is 800px and I’d like to have all divs floated to the left, but now they are stacked over eachother and I don’t know how to make div 1 be left: 0, div 2 left:800, div 3 left: 1600 and so on without using classes or nth-child selectors. Is this possible using jQuery or maybe even css?
Thank you!
There are many ways….
jQuery:
You can position your divs relative and then float them.
But you will have to have a wrapper with the width off all divs, in jQuery:
Can you please tell more about your structure (DOM, css, etc).
This helps to make the best solution for your needs…