I have a div that I am populating with an ajax call to flickr. The goal is to fill the div with photos and then fadeIn the div. The problem is that I am using javascript to distribute the photos into 3 columns based on whichever column is shortest, but if the div is initially hidden there are no dimensions so the distribution script fails and puts all images in the first column.
Is there a way to hide the div but let it still have height? Using visibility: hidden doesn’t work by the way.
As a hack, you can often fake invisibility by setting an element’s margin to -3000px (or any other large number). The element will retain its width and height but be rendered outside of the screen’s view.