• Resolved Kaetrin

    (@kaetrin)


    Hi, I am having difficulty centring images in my posts. If I choose “centre” alignment in the image editor or even in the post editor, it always displays as left aligned. In fact, sometimes it shows as right aligned in the edit panel, where centre alignment is clearly selected in the same panel and in the image editor but it still displays as left aligned (this is particularly so when there are multiple images I want centred on one line).

    It doesn’t make any sense so I’m wondering if there is a clash between WP3.9 and the theme? I am using the Encounters Lite theme (no child) and I have changed the colours and increased the display font size slightly but that is all (there are reasons I can’t use a child theme which I won’t go into here because: irrelevant – I know when the theme updates I have to go in and change the font again but that’s the only thing I have to do when the theme updates).

    I’ve always had some trouble with centred images but I looked up a couple of forums and found that if I put 10px in the image properties horizontal space section of the (advanced) image editor that seemed to fix the problem. But in WP3.9, that option is no longer there.

    Are you able to suggest some help? The html code is right. It clearly says “aligncenter” but it’s not displaying that way in posts.

    thank you
    Kaetrin

Viewing 3 replies - 1 through 3 (of 3 total)
  • There are some things with the new WP 3.9 that is creating some issues for a lot of people (WP related) but this one is something I need to fix relating to images in general. There is CSS that is making the img tag display as a block but it looks like it needs to be done as:

    img (display: inline-block;)

    I will have to do an update for the theme.

    Thread Starter Kaetrin

    (@kaetrin)

    First of all, thank you! I thought I was going crazy here.

    So, if I type in

    img (display: inline-block;)

    to the html editor – do I put it in just before “src=”?

    You’re welcome Kaetrin.
    I will be doing a few tests with this before I do an update to the theme, but in the meantime, you could just add this to the style.css of the theme near the bottom of the file.

    I’m surprised your images are always aligned left because the testing of the theme worked before. However, try the method I mentioned and see if that works for you. I will work on a new update shortly and test this again.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trouble Centring images in posts’ is closed to new replies.