這裏是我的代碼:如何使在同一行3盒?
<!-- Home Boxes Section2 -->
<?php
for($bx=1; $bx<2; $bx++) {
if(get_theme_mod('page-setting'.$bx)) {
$bxquery = new WP_query('page_id='.get_theme_mod('page-setting'.$bx,true));
while($bxquery->have_posts()) : $bxquery->the_post();
?>
<div class="one_third <?php if($bx%3==0){ ?>last_column<?php } ?>">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?>
<h4><?php the_title(); ?></h4>
<?php echo fitnesslite_content(22); ?>
<span class="ReadMore"><?php _e('Read More','fitness-lite');?></span>
</a>
</div>
<?php
endwhile;
}
else{?>
<div class="one_third <?php if($bx%3==0){ ?>last_column<?php } ?>"><a href="#"><img src="<?php echo get_template_directory_uri(); ?>/images/thumb_02.jpg"><h4><?php _e('sadasdaPage Title','fitness-lite'); ?><?php echo $bx; ?></h4><p><?php _e('Phasellus viverra aliquet magna quis interduming. Sed quis fringilla massa. In ut porttitor felis necing iaculis mi. Proin tempo...','fitness-lite');?></p><span class="ReadMore"><?php _e('Read More','fitness-lite');?></span></a></div>
<?php
}
}
?>
<!-- Home Boxes Section -->
這裏是我的問題嗎?如何讓他們在同一行? 這是1盒的代碼,我粘貼這3次,我得到3盒,但問題是他們不在同一行如何使他們在同一行。
嘗試codepen接下來的時間,https://codepen.io/ –