php - Float: left not working with WP theme using Foundation 4 -
i'm developing custom page theme (i using foundation 4) show posts of specific category. i'm trying put excerpt in box (using 4 columns class) shows thumbnail of post too.
the problem boxes getting lined below of each other (see link printscreen):
and here's code:
<?php get_header(); ?> <div class="row"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php the_content(''); ?> <?php endwhile; ?> <?php query_posts('cat=12'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="row" > <div class="large-12 columns" > <div class="large-4 columns panel" style="float:left"> <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail');?> </a> <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <?php the_excerpt(); ?> <p class="button radius radius small"><a href="<?php the_permalink(); ?>">ler matéria</a></p> </div> </div> </div> <?php endwhile; ?> <?php endif; ?> <?php wp_reset_query();?> <?php endif; ?> </div <?php get_footer(); ?>
i love if fix this!! thank much!!!
when use <div class="row">
skip next line. if want have 3 items in same row (and items total 3), set output like:
<div class="row"> <!-- start loop --> <div class="large-4 columns"> </div> <!-- end loop have created 3 * large-4 columns divs --> </div>
if want 3 items per line , have number of items kicked out loop, best use block grid. set like:
<div class="row"> <div class="large-12 columns"> <ul class="large-block-grid-3> <!-- start loop --> <li><li> <!-- end loop create many li need, , place them 3 per row --> </div>
Comments
Post a Comment