Support » Fixing WordPress » Aligning Featured Image to Center

  • Hi Everyone,

    I am new with WordPress and I need your help to fix my Website which is http://www.dodger.in where you can see that the featured images are forced to left, I would like to have it in the center as I may not be able to re-size every image before posting it. It will also be very helpful if you could please tell me a way to remove the stripes ( behind Featured image). I have tried methods from other posts but it didn’t quite help. I have a child theme enabled and can also edit CSS if you suggest. Thank you

    Regards
    Kshitij

Viewing 7 replies - 1 through 7 (of 7 total)
  • Use this CSS to do what you want, though the top image does not look quite right as the layout of the area does not put the white “text area” in the center.

    .post-thumbnail {
      background: none;
      text-align: center;
    }

    Ok this might sound a little funny but do I put this code in style.php or anywhere else? Thanks for the reply BTW innuvo 🙂

    You wont hav style.php, you will have style.css in your child theme…add it to the bottom of your style.css file if you are using a child theme (which it says you are…)

    An honest mistake 🙂 btw it worked just fine. Thatnx a tone for your help innuvo. That was awesome

    Regards
    Kshitij

    Hi,

    I have just now checked those featured images on my big screen desktop and unfortunately over there the problem still exists, (images forced towards left and diagonal stripes showing in the background of it? What should I do now?

    Thanx

    Michael

    (@alchymyth)

    Forum Moderator

    ‘technically’ the image is centered;

    you might want to have the same amount of white on the left of the post as on the right – in which case you could try to add something like:

    @media screen and (min-width: 1008px) {
    .hentry { padding-left: 30px; }
    }

    Hi alchymyth,

    I entered the code but then there was no change in the images, strangely after removing it and going back to the previous code did help. Thank you for your time.

    Regards
    Kshitij

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Aligning Featured Image to Center’ is closed to new replies.