WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Picture Not Centering (6 posts)

  1. Saildude
    Member
    Posted 4 years ago #

    When I insert a picture on a page I can't get it to center from side to side. Using the standard formatting stuff for inserting and editing the placement - not doing any of my own coding.

    Stock Painter Theme. WordPress 2.8.4 - the center works on another blog on my site.

    Thoughts or suggestions?

    Thanks

    http://captnmike.com/auxclass/

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Try editing style.css and removing:

    .entry img {
    margin:5px;
    }
  3. Shane G
    Member
    Posted 4 years ago #

    Hi,

    The solution is simple 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.

  4. Saildude
    Member
    Posted 4 years ago #

    Thanks Much

    I tried the first suggestion first to take the code out (commented out) and my pictures are now in the center - I have saved the second one just in case.

    On the second fix - the style sheet is almost 900 lines long - where about would the code go? Does this code make a difference where it goes - in some cases I know it is real important.

    thanks again for the help on this and many other posts I have read that have helped me much

  5. esmi
    Forum Moderator
    Posted 4 years ago #

    On the second fix - the style sheet is almost 900 lines long - where about would the code go?

    I don't think you need it. Most of the CSS quoted above is already present in your theme's style sheet. The line I suggested you remove was simply over-riding it.

  6. Saildude
    Member
    Posted 4 years ago #

    Thanks much

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.