lundi 20 avril 2015

How do I make a grid responsive with variable height in Boostrap?

The inner div boxes can have different heights but I need to be always above, like a vertical-align:top.

I now show this enter image description here

But need always like this enter image description here Remeber, in tablet or mobile... responsive boostrap enter image description here The php code

                $args = array( 'post_type' => 'clientes');
                $loop = new WP_Query( $args );
                if ( $loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post();
                  if ($i%2==0){ $bgcolor='#f3f3f3'; } else {  $bgcolor='#fff'; }
                    <div class="col-xs-12 col-sm-6 col-md-3 col-lg-2 partner" style="background-color: <?php echo $bgcolor; ?>">

                        <img src="<?php echo get_field('logotipo');?>" alt="<?php echo get_the_title();?>"/>
                        <?php if(get_field('proyectos')): ?>
                            <?php while(has_sub_field('proyectos')): ?>
                                    <p class="nameproject"><?php the_sub_field('nombre_proyecto'); ?></p>
                                    <p><?php the_sub_field('tipologia_proyecto'); ?></p>
                            <?php endwhile; ?>
                        <?php endif; ?>

                endwhile; endif;

Aucun commentaire:

Enregistrer un commentaire