php - Wordpress site making "holes" in output -


my page http://www.allyourpods.no/ has odd "holes" cant life of me figure out.

i love figure out how make automagickly fill site in proper fashion.

my template-file start-screen looks this:

<?php /* template name: home template */  get_header(); ?> <?php query_posts('cat='.recpodcastcategory.'&showposts=30');?> <?php $categories = get_categories('child_of='.recpodcastcategory); ?> <?php if($categories):  $count=0;?> <div class="recommended">     <div class="wrapper">         <div class="main_recommended_main_block">              <?php foreach($categories $category) { if($count<30) { $count++;                  if($count!=30) $class='recommend_block'; else $class='recommend_block_1'; ?>                 <?php if (function_exists('get_terms_meta'))                     {                         $cat_image = get_terms_meta($category->term_id, 'image',true);                         $add_play_podcast = get_terms_meta($category->term_id, 'play_download',true);                     }?>                 <div class="<?php echo $class;?>">                     <div class="main">                        <?php $play_podcast = get_post_meta($post->id,'play_podcast',true);?>                       <div class="view view-fifth"><?php if($cat_image):?><img src="<?php echo $cat_image;?>" alt="category image" /><?php endif;?>                         <?php if($add_play_podcast):?>                             <div class="mask"><a href="<?php echo get_category_link($category->term_id);?>" class="info">play</a></div>                         <?php endif; ?>                       </div>                     </div>                        <?php echo substr( category_description( $category->term_id ),0,100 ) . "..."; ?>                     </div>             <?php } } ?>             </div>   </div>  </div> <?php endif; ?> <?php if(!isset($_get['pod_category']))$class_all = ' class="active"';  ?> <div class="clr"></div> <?php get_footer(); ?> 

if more information needed please let me know.

you should add css:

.recommend_block:nth-child(4) {     clear: left; } 

the problem 1 of first 2 little lower others, blocking float.

edit: should

.recommend_block:nth-child(4n) 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -