I think I have a workaround for you, but you need to try it out. It works when I review the code and do it manually, and I think it will work. I will explain below.
Before the line of code where you call the plugin masonry()...
$('#grid').masonry({ columnWidth:250, itemSelector:".awallpost", animate:false, resizeable:false });
... set the height of the grid to its current height.
var $grid = $('#grid');
$grid.height( $grid.height() );
$('#grid').masonry({ columnWidth:250, itemSelector:".awallpost", animate:false, resizeable:false });
If this causes problems during initial loading or in some browsers, try to install .height()only if it is more than a certain amount. Try 0or a small number, for example 250.
var $grid = $('#grid');
var height = $grid.height();
if( height > 0 ) { // or some other number
$grid.height( height );
}
$('#grid').masonry({ columnWidth:250, itemSelector:".awallpost", animate:false, resizeable:false });
, masonry absolute, top left , , , absolute.
, , masonry , #grid 0, .
, , #grid (, , ) , . masonry(), , absolute.