Title: Featured image left margin inside each post
Last modified: August 21, 2016

---

# Featured image left margin inside each post

 *  Resolved [lofaro](https://wordpress.org/support/users/lofaro/)
 * (@lofaro)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/featured-image-left-margin-inside-each-post/)
 * Hi,
 * Is it possible to specify a left margin for the featured image inside each post?
   
   Let’s take [http://benvenutoinitalia.net/2014/01/05/films/rocco-e-i-suoi-fratelli/](http://benvenutoinitalia.net/2014/01/05/films/rocco-e-i-suoi-fratelli/)
   as an example. I would like that the picture is not glued to my left menu. Please
   note that the same applies for the category view ([http://benvenutoinitalia.net/category/films/](http://benvenutoinitalia.net/category/films/))
   or tag view ([http://benvenutoinitalia.net/tag/bogarde/](http://benvenutoinitalia.net/tag/bogarde/))
   and so on… The only case where I don’t want any left margin is inside the “featured”
   grid.
 * For information I use:
    – WordPress 3.9.1 – a Twenty Fourteen child theme.
 * Thank you!

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

 *  [johanna2patricia](https://wordpress.org/support/users/johanna2patricia/)
 * (@johanna2patricia)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/featured-image-left-margin-inside-each-post/#post-4972834)
 * Change the width of your featured image. Then it will become smaller and it isn’t
   glued to the left menu anymore.
 * Johanna
 *  [CrouchingBruin](https://wordpress.org/support/users/crouchingbruin/)
 * (@crouchingbruin)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/featured-image-left-margin-inside-each-post/#post-4972910)
 * The featured image is in a DIV with an class of post-thumbnail, so you can add
   a CSS rule like this to the end of your child theme’s style.css file:
 *     ```
       .post-thumbnail {
          margin-left: 25px;
       }
       ```
   
 * To prevent the home page from adding the left margin to the post-thumbnails, 
   though, you can target just the thumbnails on the home page by adding **body.
   home** to the selector:
 *     ```
       body.home .post-thumbnail {
          margin-left: 0;
       }
       ```
   
 *  Thread Starter [lofaro](https://wordpress.org/support/users/lofaro/)
 * (@lofaro)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/featured-image-left-margin-inside-each-post/#post-4972932)
 * CrouchingBruin has written:
 * > .post-thumbnail {
   >  margin-left: 25px; }
 * Hummm…do not ask me why but it changes nothing apparently…
 *  [CrouchingBruin](https://wordpress.org/support/users/crouchingbruin/)
 * (@crouchingbruin)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/featured-image-left-margin-inside-each-post/#post-4972933)
 * I see a left margin on the featured (top) image, although now the right sidebar
   text overlaps it. Plus you’ll need to add a media query to clear the left margin
   on mobile devices. Try clearing your browser’s cache.
 *  [CrouchingBruin](https://wordpress.org/support/users/crouchingbruin/)
 * (@crouchingbruin)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/featured-image-left-margin-inside-each-post/#post-4972934)
 * Modify the CSS so it looks like this:
 *     ```
       .post-thumbnail {
          margin-left: 40px;
          width: auto;
       }
       ```
   
 * This should take care of the overlapping right sidebar.
 * For media query, add this:
 *     ```
       @media screen and (max-width: 673px) {
          .post-thumbnail {
             margin-left: 0;
          }
       }
       ```
   
 * This will remove the left margin on a mobile device so the image will span the
   width of the window.
 *  Thread Starter [lofaro](https://wordpress.org/support/users/lofaro/)
 * (@lofaro)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/featured-image-left-margin-inside-each-post/#post-4972941)
 * CrouchingBruin has written:
 * > Try clearing your browser’s cache.
 * You were right 😉
 * > Modify the CSS so it looks like this:
   >  .post-thumbnail { margin-left: 40px;
   > width: auto; }
 * Great!
 * > To prevent the home page from adding the left margin to the post-thumbnails,
   > though, you can target just the thumbnails on the home page by adding body.
   > home to the selector:
   >  body.home .post-thumbnail { margin-left: 0; }
 * Great!
 * Topic closed. Thank you very much for your assistance! 🙂

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

The topic ‘Featured image left margin inside each post’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/twentyfourteen/4.4/screenshot.
   png)
 * Twenty Fourteen
 * [Support Threads](https://wordpress.org/support/theme/twentyfourteen/)
 * [Active Topics](https://wordpress.org/support/theme/twentyfourteen/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/twentyfourteen/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/twentyfourteen/reviews/)

## Tags

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

 * 6 replies
 * 3 participants
 * Last reply from: [lofaro](https://wordpress.org/support/users/lofaro/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/featured-image-left-margin-inside-each-post/#post-4972941)
 * Status: resolved