WordPress.org

Ready to get started?Download WordPress

Forums

Images NOT centred inside the caption (5 posts)

  1. gwileswp
    Member
    Posted 5 months ago #

    Hi
    The caption on my image is aligned left - but I want it centred.
    here is th ecode

    [caption id="attachment_914" align="alignright" width="315"]<img class=" wp-image-914 " alt="Sophie and Sabina from PA Business Support" src="http://www.pabusinesssupport.co.uk/wp-content/uploads/SophandSabina.jpg" width="315" height="225" /> Lunching with my colleague Sabina[/caption]

    I have tried adding this code to the style sheet:
    .wp-caption img {
    margin: 0 auto!important;
    padding: 0!important;
    border: 0 none!important;
    }

    I added it above
    caption, th, td {

    font-weight: normal;

    text-align: center;

    }

    but no change
    what should I add where?

  2. ManuelGarciaPH
    Member
    Posted 5 months ago #

    It would be better if there is a demo page or the actual page for us to be seen so we can experiment easily.

  3. alchymyth
    Forum Moderator
    Posted 5 months ago #

    .wp-caption p { text-align: center; }
  4. gwileswp
    Member
    Posted 5 months ago #

    Thank you
    This is the page:
    http://www.pabusinesssupport.co.uk/do-you-like-who-you-work-with/
    and thanks for the code - but I am not sure where to insert it - in the theme editor / style sheet? where exactly?
    Thank you

  5. Andrew
    Forum Moderator
    Posted 5 months ago #

    We don't know either because it looks like you're using a custom-built theme.

    The way I normally recommend is to 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.

Reply

You must log in to post.

About this Topic