Support » Fixing WordPress » Image: aligned in the editor, but not aligned in the post

  • Resolved abjnoticias


    My blog has the following problem:

    when I upload an image and adjust it in the editor of posts, it gets correctly aligned, left or right, with the text surrounding the image. But when I post it, the image don’t get aligned as it was in the editor. This problem occurs since I installed the 2.6 version and the older posts still keep the correct alignment, while the newer posts have this problem.

    Please help me. If the solution of this problem is already described in one place in this site, please, just tell me where it is and I read it.

    Thank you for your support!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Towards the bottom, in the “Additional Questions” section.

    Yes, it actually does work and it was simple.
    1.) Go to “Appearance”
    2.) Go to “Editor”
    3.) On the right hand side of the page click on “Style.css”
    4.) Go in the middle of the code and find an empty line and make a few more spaces and then just paste this code in exactly as it appears:

    img.centered, .aligncenter, div.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;

    img.alignright {
    padding: 4px;
    margin: 0 0 2px 7px;
    display: inline;

    img.alignleft {
    padding: 4px;
    margin: 0 7px 2px 0;
    display: inline;

    .alignright {
    float: right;

    .alignleft {
    float: left;

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Image: aligned in the editor, but not aligned in the post’ is closed to new replies.