Title: Margin-bottom @ thumbnail in post loop
Last modified: August 19, 2016

---

# Margin-bottom @ thumbnail in post loop

 *  Resolved [Smoothweb](https://wordpress.org/support/users/smoothman/)
 * (@smoothman)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/margin-bottom-thumbnail-in-post-loop/)
 * I have a thumbnail set up next to the excerpt summery text of the posts.
    All
   is well, but underneath the thumb there is a padding/ margin of 7px. I can’t 
   get rid of it. The crazy thing about it is that when I put text instead of the
   image code the padding is gone…. I can’t yet put the site online through restrictions,
   but hopefully someone can help me with this.
 * **Image of post with thumbnail**
    [7px margin or padding](http://foodquest.nl/img1.jpg)
 * **Image of post with text instead of image**
    [no margin or padding](http://foodquest.nl/img2.jpg)
 * **Code of the loop**
 *     ```
       <div id="totaal-post">
       	<ul class="post-not">
           <li>
           	<div id="post-summary">
           	         <?php $thumb = get_post_meta($post->ID, "thumb", true);
       				 if ($thumb != ""){ ?>
       				 <?php the_excerpt(); ?>
       				 <?php } else { ?>
       				 <?php the_content(); ?>
       				 <?php } ?>
           	</div>
          		 <div class="post-thumbnails">
   
       		 <?php the_post_thumbnail(array(120,120), array('class' => ''));?>
                </div>
       	</li>
       	</ul><!-- .posts-quick -->    
   
               <?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
               	<?php else : ?>
       			<?php endif; ?>
           </div><!-- #archive-posts -->
       ```
   
 * **Code of the CSS**
 *     ```
       #totaal-post{
       	border:solid #d4d4d4 1px;
       	margin-bottom: 20px;
       	pading: 0;
       	background: url(images/post_bg.gif) repeat-x left top #f1f1f1;
       }
   
       .post-not{
       	list-style: none;
       	margin: 0px;
       	padding: 0px;
       	overflow: hidden;
       }
   
       .post-thumbnails {
       	float:left;
       	width:120px;
       	background-color:#F66;
       	text-align:center;
       }
   
       #post-summary {
       	width:498px;
       	padding: 10px;
       	float:right;
       	background-color:#FFC;
       	line-height: 1.3em;
       	color: 000;
       }
       ```
   

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Smoothweb](https://wordpress.org/support/users/smoothman/)
 * (@smoothman)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/margin-bottom-thumbnail-in-post-loop/#post-1596770)
 * *BUMP*
 *  [Jurre](https://wordpress.org/support/users/jurre/)
 * (@jurre)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/margin-bottom-thumbnail-in-post-loop/#post-1596771)
 * Try giving the <img> a display: block.
 *  Thread Starter [Smoothweb](https://wordpress.org/support/users/smoothman/)
 * (@smoothman)
 * [15 years, 10 months ago](https://wordpress.org/support/topic/margin-bottom-thumbnail-in-post-loop/#post-1596794)
 * thnx works like a charm!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Margin-bottom @ thumbnail in post loop’ is closed to new replies.

## Tags

 * [image](https://wordpress.org/support/topic-tag/image/)
 * [margin](https://wordpress.org/support/topic-tag/margin/)
 * [thumbnails](https://wordpress.org/support/topic-tag/thumbnails/)

 * 3 replies
 * 2 participants
 * Last reply from: [Smoothweb](https://wordpress.org/support/users/smoothman/)
 * Last activity: [15 years, 10 months ago](https://wordpress.org/support/topic/margin-bottom-thumbnail-in-post-loop/#post-1596794)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
