All problems solved!
1) avoid overlapping items by means of the method imagesloaded in scripts.js
jQuery( document ).ready( function( $ ) {
infinite_count = 0;
// Triggers re-layout on infinite scroll
$( document.body ).on( 'post-load', function () {
infinite_count = infinite_count + 1;
var $container = $('#dynamic-grid');
var $selector = $('#infinite-view-' + infinite_count);
var $elements = $selector.find('.hentry');
$elements.hide();
jQuery('#dynamic-grid').masonry({isAnimated: false});
$container.imagesLoaded( function() {
$container.masonry('reload');
});
$elements.show();
});
});
2 Random pagination in the url can be avoided by setting wrapper to false in functions.php
add_theme_support( 'infinite-scroll', array(
'container' => 'dynamic-grid',
'footer' => true,
'type' => 'scroll',
'posts_per_page' => 6,
'wrapper' => false
) );
And switching the footer and navigation links of in css
/* Hides navigation links and site footer when infinite scroll is active */
.infinite-scroll #nav-below,
.infinite-scroll.neverending #colophon {
display: none;
}
/*Shows the footer again in case all posts have been loaded
.infinity-end.neverending #colophon {
display: block;
}*/
/* Don't show the footer again in case all posts have been loaded */
.infinity-end.neverending #colophon {
display: none;
}
/* Inifnite Scroll - Spinner */
.infinite-loader {
color: #000;
position: fixed;
left: 50%;
top: 50%;
}