我想要一行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