Viewing 6 replies - 1 through 6 (of 6 total)
  • you shouldn’t have to rewrite the css. Basically when you add an image to a post (via add media) it should give you the option to select alignment (left, right, center and none)

    If you do want to do it through your CSS find this in your stylesheet:

    .post img {
    max-width: 676px;
    margin-bottom: 20px;
    border: none
    padding: 2px;
    }

    try adding

    margin-left:auto;
    margin-right:auto;

    Thread Starter louidam

    (@louidam)

    I always insert pictures in the html and I upload my pictures til flickr and not to wordpress. So I can’t just select the alignment.

    The code did not work, unfortunately ??

    ?? I think there’s a little misunderstanding…

    I think you write the blogpost with wordpress and then when you want to insert a picture you click on insert/add media and then you select the image you want to place in the blogpost.

    When you do it like this you will get an option to choose the alignment (left, right, center or none)

    like explained (with screenshots) here in the wordpress codex

    I just saw you’re using a child theme. So if you want to do it with CSS you might have to use it like this

    .post img {
    max-width: 676px;
    margin-left:auto !important;
    margin-right:auto !important;
    margin-bottom: 20px;
    border: none
    padding: 2px;
    }

    Thread Starter louidam

    (@louidam)

    Hi again,

    I did understand you at first. But I do not use the button add media when I write a post. I just write the html code direct in the post.

    This code did not work. It’s strange.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problem with center image’ is closed to new replies.