2016-05-15 56 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以及