Forums

[resolved] Aligncenter not working (4 posts)

  1. ajithkpunnoose
    Member
    Posted 2 years ago #

    I have installed arras theme on my WP blog the other day. I have the latest version of both the theme as well as WP. The problem is that captions work OK, but the images using aligncenter class is not aligned to center. The aligncenter class is there is the style.css file and reads

    .aligncenter { display: block; margin: 0 auto; }
    .alignright { float: right; margin: 0 0 1em 1em; }
    .alignleft { float: left; margin: 0 1em 1em 0; }
    .floatleft { float: left; }
    .floatright { float: right; }
    img.aligncenter, img.alignright,
    img.alignleft { border: 3px solid #EEE; }

    the blog address is : http://www.exnol.com
    and post address is (please note that this is not post specific, all posts have this problem) : http://www.exnol.com/windows/how-to-disable-access-to-drives-using-disk-management

  2. alchymyth
    The Sweeper
    Posted 2 years ago #

    the wp-caption style has a fixed margin which seems to be more specific than the .aligncenter:

    in default.css of the theme:

    .wp-caption { border: 1px solid #DDD; text-align: center; background: #F3F3F3; padding-top: 4px; margin: 10px }

    try and remove this 'margin: 10px;' or at least change it to 'margin-top: 10px; margin-bottom: 10px;'

  3. ajithkpunnoose
    Member
    Posted 2 years ago #

    Thanks a lot alchymyth. I didn't even care to look at the caption thing. So dumb of me.

  4. rodriguex
    Member
    Posted 1 year ago #

    Thanks! I had a similar problem, this shed a lot of light!

Topic Closed

This topic has been closed to new replies.

About this Topic