center image in post

  • Posted in : Readme
  • Eduardo
    Participant

    Hi,

    I believe this will be super simple for you. I promised i tried every css example i found in the internet, but i can’t make it work, tough.

    How can i center an image in a blog post, please? I tried the classes .center and .aligncenter, but they also didn’t work. Here: http://taijiquan.pro.br/estilo-chen/coluna-reta-corpo-reto/
    I’d like to center the image in the post (not the title area image).

    Thank you,
    Eduardo

    Mehmet S.
    Keymaster

    Hi, click your image in the editor and align with the buttons.

    See image:

    Eduardo
    Participant

    Hi Mehmet, thank you.

    I just tried it, it did not work. In fact what this does is add the class “aligncenter” to the image. I did this manually before, and it didn’t work too.

    Any idea of what could be causing this?

    ahmetsali
    Keymaster

    Hi, i see you have created a child theme and overrided style.css file with yours which doesn’t contain default wordpress content alignment classes, you need to add them too in to your style.css

    this is yours;

    http://taijiquan.pro.br/wordpress/wp-content/themes/readme-child/style.css

    and this is the original one with the alignment classes;

    http://themes.pixelwars.org/readme-wp/wp-content/themes/readme/style.css

    Eduardo
    Participant

    Thanks a lot Ahmet, that solved it.

    (I had no idea i would be replacing the original style.css by creating a child theme – i thought i would just add to the original).

    Just rated Readme at 5 stars in Themeforest.

    ahmetsali
    Keymaster

    glad it helped, thanks for the rating.

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register