• Hi, all. I could really use a hand here. My team and I purchased a theme and the CSS was somewhat sloppy throughout. We’ve done some tweaks to get things working as they should.

    The problem I am having is that in a post, I will post an image and center it and the image will publish fine.

    I then go and create a post, use that same image, center it, ADD A LINK TO IT and publish it. But now the image is published and its aligned to the left on the site even though I selected center when inserting the image.

    This is only happening when a link is attached to the image when you insert it. If I choose ‘none’ for link, the image publishes fine.

    Would someone mind taking a look at the page and seeing if you could figure out whats wrong with the CSS?

    Look at the link below. You will see the first image which has a link attached and is centered but shows aligned left. The second is the same image without a link and that centers itself fine.

    http://echoba.se/shanes-test-post/

    Thanks!

Viewing 1 replies (of 1 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    If you’re not using a Child Theme, and if the theme doesn’t have a designated section of the dashboard for CSS modifications then install this Custom CSS Manager plugin http://wordpress.org/plugins/custom-css-manager-plugin

    Then use its “CSS Code” section of the dashboard to hold your CSS modifications:

    Alternatively use your Child Theme style.css file to hold your CSS modifications:

    html .body-content *:not(.wp-caption) > a > img[class*="wp-image-"] {
        margin: 0 auto;
    }

Viewing 1 replies (of 1 total)

The topic ‘Image center align issue with link’ is closed to new replies.