WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Picture Not Centering

[Resolved] Picture Not Centering

  • Saildude

    @saildude

    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/

Viewing 5 replies - 1 through 5 (of 5 total)
  • esmi

    @esmi

    Forum Moderator

    Try editing style.css and removing:

    .entry img {
    margin:5px;
    }
    Shane G

    @shane-g

    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.

    Saildude

    @saildude

    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

    esmi

    @esmi

    Forum Moderator

    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.

    Saildude

    @saildude

    Thanks much

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Picture Not Centering’ is closed to new replies.