段組が上手くいきません
-
はじめまして。
かなり初歩的な質問だとは思うのですが、行き詰ってしまいましたので
どうかご教授ください。トップページに更新情報を2つ横並びで表示させたいのですが、
.phpの方に、下の記述で、///////////////////////////////////////////////
<div class=”list”>
<?php
$myposts = get_posts(‘numberposts=5&category=6’);
foreach($myposts as $post) :
?>
<dt><?php echo date(“Y年m月d日”, strtotime($post->post_date)); ?></dt>
<dd>“><?php the_title(); ?></dd><?php endforeach; ?>
</div><div class=”list2″>
<?php
$myposts = get_posts(‘numberposts=5&category=8’);
foreach($myposts as $post) :
?>
<dt><?php echo date(“Y年m月d日”, strtotime($post->post_date)); ?></dt>
<dd>“><?php the_title(); ?></dd><?php endforeach; ?>
</div>
///////////////////////////////////////////////////////////////そして、 .css の中に以下の記述をしています。
///////////////////////////////////////////////////////////////
.list{
height: 180px;
overflow:auto;
background:url(/images/a1.png) repeat;
float: left;
width:400px;
}dl{
width: 350px;
height: 50px
line-height: 2em;
margin-bottom: 35px;
margin-left:0px;
margin-top:0px;
}dt{
width: 200px;
padding: 2px;
text-align:left;
}dd{
margin: 3px 3px 10px 20px;
margin-top: -0.5em;
border-bottom:1px dotted #250d00;
width:350px;
padding:2px;
}.list dt {
color: #622d18;}.list dd a {
color: #622d18;}//////////////////////////////////////////////////////////////////
どうか、アドバイス宜しくお願い致します。
- トピック「段組が上手くいきません」には新たに返信することはできません。