WordPress.org

Ready to get started?Download WordPress

Forums

Caption will not have space on left (5 posts)

  1. jrothra
    Member
    Posted 5 years ago #

    I'm using a different thread since this is a different problem.

    WP Version: 2.6.2

    I've edited the CSS code for the caption to this (note, it's the last thing in the stylesheet):

    .aligncenter,
    div.aligncenter {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    
    .wp-caption {
        border: 1px solid #ddd;
        text-align: center;
        background-color: #f3f3f3;
        padding-top: 4px;
        margin: 10px;
        -moz-border-radius: 3px;
        -khtml-border-radius: 3px;
        -webkit-border-radius: 3px;
        border-radius: 3px;
    }
    
    .wp-caption img {
        margin: 0;
        padding: 0;
        border: 0 none;
    }
    
    .wp-caption p.wp-caption-text {
        text-align: left;
        font-size: 11px;
        font-family: Arial, Sans-Serif;
        line-height: 17px;
        padding: 0 4px 5px;
        margin: 0 4px;
    }

    Here's the page: http://www.jrothraministries.com/2008/09/30/just-because-it-says-it-does-not-mean-do-it/

    If you notice, I've set the caption to be left aligned rather than centered, but despite having a margin/padding of 4px, it displays as if it is set to zero. This baffles me!

  2. jrothra
    Member
    Posted 5 years ago #

    No thoughts on this?

  3. jrothra
    Member
    Posted 5 years ago #

    I guess I'm the only one who has this problem.

  4. curtismchale
    Member
    Posted 5 years ago #

    the margin at the end is not set to be left aligned. it is set to 0px top and bottom and 4px left and right. if you only put in 2 values that's how it works. to get what you want you would need 0 4px 0 0 that would give 4px on the left and 0 on all other sides.

  5. observerxtra
    Member
    Posted 5 years ago #

    jrothra,

    I came across this thread while searching for the solution myself. I finally found something...so I thought I'd share. Try adding this to your CSS:

    #contentleft .wp-caption p {
    margin:0 5px 0 5px;
    padding:0 0 0;
    text-align: left;
    }

    You'll likely need to adjust the left and right margin to match the rest of your style, but this should do the trick. This will also clear the nasty excessive space under the caption text.

    best of luck!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.