我想要一行3列,根据其中一列内部文本的长度/大小,所有3列应具有相同的高度。所以,3列应该有相同的高度,并考虑到最大尺寸的柱子在同一行。响应文本的列高度
这是错误,我得到:
这是我的代码:
<?php// Define our WP Query Parameters ?>
<?php $the_query = new WP_Query('posts_per_page=3'); ?>
<?php// Start our WP Query ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<div class="col-sm-6 col-md-3">
<div class="thumbnail"><a href="<?php the_permalink() ?>"><?php the_post_thumbnail(array(100, 100)); ?></a>
<div class="caption">
<?php// Display the Post Title with Hyperlink?>
<h3 class="center"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3>
<!--// Repeat the process and reset once it hits the limit-->
</div>
</div>
</div>
<?php
endwhile;
wp_reset_postdata();
?>
这是CSS:
div.caption{
text-align: center;
}
div.thumbnail{
border: 4px inset black;
height: 200px;
}
h3.center{
font-size: 20px;
}
看看这个问题:http://stackoverflow.com/questions/19695784/how-can-i-make-bootstrap-columns-all-the-same-height – Asher
嗨,我看到这篇文章,但也没有的解决方案解决了这个问题。有些没有均匀分布色谱柱,有些则根本无法使用。 – FilT