WordPress.org

Forums

Zenlite: Images won't center when told to (2 posts)

  1. flugennock
    Member
    Posted 5 years ago #

    Pretty much what it says in the title. I insert an image, specify that it be centered in the page, I save the change, I updated the post, I view the post, and...you guessed it, the image is still aligned left.

    The page is at http://www.sinkers.org/stage , using the theme "Zenlite"

    TIA,
    flugennock@sinkers.org

  2. Shane G
    Member
    Posted 5 years ago #

    Hi,

    You just need to copy the following code and paste it in style.css of the theme.

    img.centered
    {
    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;
    }

    Add this code in style.css file.of your theme and it should be resolve the problem. If it does not solve the problem then replace the .img{} tags with the above code in style.css.

    Thanks,

    Shane G.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags