Support » Fixing WordPress » Caption will not have space on left

  • 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):

    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:

    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!

Viewing 4 replies - 1 through 4 (of 4 total)
  • No thoughts on this?

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

    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.


    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!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Caption will not have space on left’ is closed to new replies.