2016-05-15 59 views
0

我试图摆脱我的wordpress循环中的以下返回。我想显示该条目旁边的缩略图,它看起来可怕:我该如何摆脱那里的回报?

the situation

我试图用填充的条目,但它更糟糕!

这里是我的代码:

#thumbnail_single { 
 
    float: left; 
 
} 
 
.entry_single { 
 
    padding: 20px; 
 
}
<div id="single"> 
 

 
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?> 
 
    <h2 class="title_single"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> 
 

 
    <div id="thumbnail_single"> 
 

 
    <?php if (has_post_thumbnail()) : ?> 
 
    <?php the_post_thumbnail(); ?> 
 
    </a> 
 
    <?php endif; ?> 
 

 
    </div> 
 
    <div class="entry_single"> 
 
    <?php the_content(); ?> 
 
    </div> 
 
    <?php endwhile; endif; ?> 
 

 
</div> 
 
<!-- single -->

感谢您与您的帮助!

+0

如果你想让.entry_single直接放在一边而不是换行,那么你应该设置一个图像的边缘权限,为.entry_single添加overflow:hidden属性,padding也会被应用 –

回答

1

尝试增加20像素填充到您#thumbnail_single以及