• Resolved David_1

    (@david_1)


    Hello Friends,

    Using the Twenty Fourteen theme and have run into an image issue and wondering if someone would be willing to take a peek and advise.

    For some reason regarding my Post’s, the images have a greyed out area to the right of the image. I have tried some css such as:

    }
    .post-thumbnail {
    	float: right;
    }
    
    and 
    
    }
    .post-thumbnail {
    	align: center;
    }

    However that doesn’t do anything as it moves the whole area over. I just want the image to move, (center would be perfect) and get rid of the greyed area.

    http://i-brand.ca/custom-theme-wordpress/

    If anyone can lend a thought or a hand, I would be most grate ful. Many thanks in advance for taking a look.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can get rid of the grey area by setting the background to none. You may also be able to use a left margin to provide a little space on the left. Try adding this to the end of your child theme’s style.css:

    .post-thumbnail {
        background: none;
        margin-left: 10px;
    }

    The greyed out area is default to the TwentyFourteen theme. Any image that does not fit the entire crop area will have these grey horizontal bars to the left and right of the image.

    In regards to getting the image centered, this code will work wonders:

    .post-thumbnail img {
      display:block;
      margin:0 auto;
    }

    You will then see the grey bars to the left and the right of the image, which I had mentioned above. I would use vtxyzzy’s code to remove the bars.

    Or just use:

    .post-thumbnail {
        background: none;
    }

    Evan

    Thread Starter David_1

    (@david_1)

    vtxyzzy & Evan,

    You were both spot on and again many thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Posts Not Centering’ is closed to new replies.