mehrab1387
چهارشنبه 24 خرداد 1391, 17:38 عصر
سلام دوستان
من تو طراحی سایت تازه کارم.
دارم یه قالب رو برای سیستم وردپرس طراحی میکنم.
وقتی می خوام مطالب رو به یک div که برای پست ها در نظر گرفتم اضافه کنم
اگر زیلد باشد از div بیرون میزنه.البته من ارتفاع را 100 گرفتم که به خاطر همان است
و وقتی ارتفاع را بردارم همه چیز جا به جا می شود.
لطفا کمک کنید
عکس را در ضمیمه قرار دادم
کد html و css در زیر است:
html
<?php get_header(); ?>
<div class="text-up2"></div>
<div class="text-center2" style="width: 610px; height: auto">
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
<?php
$postimg = get_post_meta($post->ID, "postimg", true);
?>
<div class="post">
<div class="posttitle"><h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div>
<div class="postimg">
<img alt="<?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php echo $postimg; ?>" width="100" height="100" />
</div>
<div class="post-body">
<?php the_content(' '); ?>
</div>
</div>
<?php endwhile; ?> <?php endif; ?>
</div>
<div class="text-down"></div>
</body>
</html>
css :
.text-center2 {
background-image: url(images/text-center.png);
background-repeat: repeat-y;
width: 610px;
float: left;
margin-left: 10px;
}
.post
{
}
.posttitle
{
text-align:right;
margin-right:30px;
}
.postimg
{
float:right;
margin-top:5px;
margin-right:30px;
}
.post-body
{
margin-right:100px;
margin-top:5px;
height:100px;
width:400px;
border:1px solid #000;
}
من تو طراحی سایت تازه کارم.
دارم یه قالب رو برای سیستم وردپرس طراحی میکنم.
وقتی می خوام مطالب رو به یک div که برای پست ها در نظر گرفتم اضافه کنم
اگر زیلد باشد از div بیرون میزنه.البته من ارتفاع را 100 گرفتم که به خاطر همان است
و وقتی ارتفاع را بردارم همه چیز جا به جا می شود.
لطفا کمک کنید
عکس را در ضمیمه قرار دادم
کد html و css در زیر است:
html
<?php get_header(); ?>
<div class="text-up2"></div>
<div class="text-center2" style="width: 610px; height: auto">
<?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
<?php
$postimg = get_post_meta($post->ID, "postimg", true);
?>
<div class="post">
<div class="posttitle"><h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div>
<div class="postimg">
<img alt="<?php the_title(); ?>" title="<?php the_title(); ?>" src="<?php echo $postimg; ?>" width="100" height="100" />
</div>
<div class="post-body">
<?php the_content(' '); ?>
</div>
</div>
<?php endwhile; ?> <?php endif; ?>
</div>
<div class="text-down"></div>
</body>
</html>
css :
.text-center2 {
background-image: url(images/text-center.png);
background-repeat: repeat-y;
width: 610px;
float: left;
margin-left: 10px;
}
.post
{
}
.posttitle
{
text-align:right;
margin-right:30px;
}
.postimg
{
float:right;
margin-top:5px;
margin-right:30px;
}
.post-body
{
margin-right:100px;
margin-top:5px;
height:100px;
width:400px;
border:1px solid #000;
}