I have a site that is ~5000 pixels in height (ie relatively large). In order to position things absolutely on it I've created the below setup:
absolute div --> relative div --> multiple absolutely positioned images
I'm wondering if it is costly for processing purposes that my absolutely positioned div and relative div are 100% height each on such a large page?
The reason I am doing this is because I am transforming the parent div with translateY
(which uses the GPU). However translateY
translate elements relative to their height. If I do this on the images, it becomes difficult to move multiple elements with the same speed since they will be different height. I.e. I will need to translateY(200%)
for an image that is half the height as the other image.
However moving the parent absolute div is much easier.
But my concern is that it is quite costly in that it is such a large div. Can someone with more knowledge let me know if this is bad to have such a large absolutely position div and relative div? Note I have a lot of images on my site...