How would you make a liquid grid of elements with uniform size and margins in CSS?
The main problem I have is the margins. I feel that the obvious solution is to set the widths and margins to a percentage and be done with it. This doesn't work because the vertical margin is a percentage of the container's width. When the container resizes horizontally, the vertical spacing is off.
I have tried two methods. One with percentage margins and one with 'em' margins. Neither of them scale correctly. What can I do?
Are you looking for something like this? http://jsfiddle.net/LMJTu/
On the fiddle, click the button to change the size of the outer div.