トップページの画像と記事を横に並べて表示したい。
-
サイドバーの横のフロントページに投稿記事のタイトルと内容をphpで画像をプラグインのQF-GetThumbで表示しています。これらの配置が現在縦に配置されており、これを横に
並べて表示したいと思っているのですがうまくいきません。
なかなか検索してもヒントまでたどり着けずにいる状態です。一応box配置になると思いcssでfloatをleftにしているのですが。。
<div id="container"> <div class="item"> <?php query_posts('posts_per_page=5'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permalink a "> <p class="toppoint"><?php the_title(); ?></p> <?php echo the_qf_get_thumb_one('width=200'); ?></a> <?php echo my_excerpt(50); ?> <?php endwhile; endif; ?> <?php wp_reset_query(); ?> </div> </div>
CSSではこのようにしています。
.container { overflow: hidden; } /* clearfix */ .container:before, .container:after { content: ""; display: table; } .container:after { clear: both; } .item{ width:210px; margin:10px; float:left; background-color:#fff; color:#333333; }
7件の返信を表示中 - 1 - 7件目 (全7件中)
7件の返信を表示中 - 1 - 7件目 (全7件中)
- トピック「トップページの画像と記事を横に並べて表示したい。」には新たに返信することはできません。