浮动的Div,文字在下面

时间:2012-05-28 12:23:18

标签: html wrapping

http://www.masterrenny.com/armorsmiths/<<正如你所看到我有问题停止在图像div下浮动到右边的文本

这是使用

的代码
<style>
.prof { width:970px; overflow:hidden; margin-top:20px; }
.prof .title { font-size:35px; float:left; text-transform:uppercase; width:970px; overflow:hidden; font-weight:bold; z-index:9998; border-bottom:solid 1px #CCC; margin-bottom:20px; position: relative; }
.prof .img {width:300px; height:300px; overflow:hidden; margin-bottom:5px; padding:5px; border: solid #CCC 1px; z-index:9999; position: absolute; left:818px; background:white;}
.prof .meta { }
.prof .content {overflow:hidden; position: relative; }
</style>

<!--Prof Start-->
<div class="prof">
<div class="title"><?php the_title(); ?></div>
<div class="meta"></div>
<?php if(has_post_thumbnail()): ?>
<?php $fullImage = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); ?>
<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'prof-feature'); ?>
<div class="img"></a> <img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" width='300' height='300' /></div>
    <?php endif; ?>
<?php the_content(); ?>
</div>
<!--Prof End-->

我似乎无法弄明白:(

1 个答案:

答案 0 :(得分:0)

将标题div移到“wpslred”中。它将在红色框内