Шаблон Bootstrap. На мониторе разрешением больше 900px - хорошо смотрится, а именно миниатюры записей выводятся в три столбика. Если уменьшить разрешение экрана меньше 900px, то вёрсткой предусмотрено что бы миниатюры уже выводились в два столбика. Проблема в том, что блоки идут не один за другим. Они разбиты по рядам по 3 записи - на одной строчке 2 миниатюры, на второй только одна (нужно тоже 2), на третей снова 2, потом снова одна. Можно ли при помощи CSS подвинуть записи ровно, что бы после трех записей не было пробела?
<div id="primary-home" class="content-area col-md-12">
<main id="masonry" class="site-main col-md-12" role="main">
<?php if ( have_posts() ) : ?>
<?php /* Start the Loop */$ink_count = 0; $ink_row_count=0 ?>
<?php while ( have_posts() ) : the_post();
if ($ink_count == 0 ) {echo "<div class='row-".$ink_row_count." row'>";}
?>
<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', 'home' );
?>
<?php
if ($ink_count == 2 )
{
echo "</div>";
$ink_count=0;
$ink_row_count++;
}
else {
$ink_count++;
}
endwhile;
?>
<?php else : ?>
<?php get_template_part( 'no-results', 'index' ); ?>
<?php endif; ?>
</main><!-- #main -->
<?php inkzine_pagination(); ?>
</div><!-- #primary -->